Initial port to python3
[htsworkflow.git] / htsworkflow / automation / runner.py
index 7b0c4c9d7ca6b47e59254b27e2171876525e6715..154c79e824d74bd07fdb05c7e4b011fede45d648 100644 (file)
@@ -68,27 +68,27 @@ class Runner(rpc.XmlRpcBot):
         """
         Parse xmpp chat messages
         """
-        help = u"I can send [start] a run, or report [status]"
-        if re.match(u"help", msg):
+        help = "I can send [start] a run, or report [status]"
+        if re.match("help", msg):
             reply = help
         elif re.match("status", msg):
             words = msg.split()
             if len(words) == 2:
                 reply = self.getStatusReport(words[1])
             else:
-                reply = u"Status available for: %s" \
-                        % (', '.join([k for k in self.conf_info_dict.keys()]))
-        elif re.match(u"start", msg):
+                reply = "Status available for: %s" \
+                        % (', '.join([k for k in list(self.conf_info_dict.keys())]))
+        elif re.match("start", msg):
             words = msg.split()
             if len(words) == 2:
                 self.sequencingFinished(words[1])
-                reply = u"starting run for %s" % (words[1])
+                reply = "starting run for %s" % (words[1])
             else:
-                reply = u"need runfolder name"
-        elif re.match(u"path", msg):
-           reply = u"My path is: " + unicode(os.environ['PATH'])
+                reply = "need runfolder name"
+        elif re.match("path", msg):
+           reply = "My path is: " + str(os.environ['PATH'])
         else:
-            reply = u"I didn't understand '%s'" %(msg)
+            reply = "I didn't understand '%s'" %(msg)
 
         LOGGER.debug("reply: " + str(reply))
         return reply
@@ -196,7 +196,7 @@ class Runner(rpc.XmlRpcBot):
                 #startCmdLineStatusMonitor(ci)
 
                 # running step
-                print 'Running pipeline now!'
+                print('Running pipeline now!')
                 run_status = run_pipeline(conf_info)
                 if run_status is True:
                     LOGGER.info('Runner: Pipeline: success')