Don't add trailing spaces when producing logs
[SaveMySugar/python3-savemysugar.git] / src / savemysugar / CallDistanceTransceiver.py
index f218bcc..29c3fb8 100755 (executable)
@@ -205,7 +205,7 @@ class CallDistanceTransceiver(object):
         self.end_of_message = False
 
     def log_symbol(self, distance, symbol, extra_info=""):
-        logging.info("distance: %.2f Received \"%s\" %s", distance, symbol,
+        logging.info("distance: %.2f Received \"%s\"%s", distance, symbol,
                      extra_info)
 
     def receive_character(self):
@@ -247,7 +247,7 @@ class CallDistanceTransceiver(object):
            call_distance <= self.signalspace_time.max:
             signal = self.morse_message.strip().split(' ')[-1]
             character = self.translator.signal_to_character(signal)
-            self.log_symbol(call_distance, ' ', "got \"%s\"" % character)
+            self.log_symbol(call_distance, ' ', " got \"%s\"" % character)
             self.morse_message += " "
             return
 
@@ -255,14 +255,14 @@ class CallDistanceTransceiver(object):
            call_distance <= self.wordspace_time.max:
             signal = self.morse_message.strip().split(' ')[-1]
             character = self.translator.signal_to_character(signal)
-            self.log_symbol(call_distance, '/', "got \"%s\"" % character)
+            self.log_symbol(call_distance, '/', " got \"%s\"" % character)
             self.morse_message += " / "
             return
 
         if call_distance > self.eom_time.min:
             signal = self.morse_message.strip().split(' ')[-1]
             character = self.translator.signal_to_character(signal)
-            self.log_symbol(call_distance, 'EOM', "got \"%s\"" % character)
+            self.log_symbol(call_distance, 'EOM', " got \"%s\"" % character)
             self.end_of_message = True
             self.previous_ring_time = -1
             self.previous_call_time = -1