Commits

Gabriel AHTUNE committed 8acbacd

changed sshell.pyw

  • Participants
  • Parent commits 84df734

Comments (0)

Files changed (1)

                 sbytes = self.command.send(message)
                 self.write_message(
                     "send: ",
-                    hex(sbytes) + " " + sml.prettify(message),
+                    "{} {}".format(hex(sbytes), sml.prettify(message)),
                     "send"
                 )
             else:
         )
 
     def print_msg_auto_sent(self, msg):
-        towrite = hex(msg.SBytes) + " S%dF%d " % (msg.stream, msg.function)
-        towrite += "W " if msg.W else ""
-        towrite += sml.print_list([msg.content])
+        towrite = "{} S{}F{} {}{}".format(
+                hex(msg.SBytes), 
+                msg.stream, msg.function,
+                "W " if msg.W else "",
+                sml.print_list([msg.content]))
         self.GUI.write_message(
             "Send: ",
             towrite,
     ##logging_fmt = '%(asctime)s from %(name)s - %(threadName)s - %(thread)d :\
     ##        %(levelname)s; %(message)s'
 
-    file = os.path.join('Logs', 'Sshell_log_' + now + '.log')
+    file = os.path.join('Logs', 'Sshell_log_{}.log'.format(now))
 
     handler = logging.handlers.RotatingFileHandler(
             file,