Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/command.py
diff options
context:
space:
mode:
Diffstat (limited to 'devbot/command.py')
-rw-r--r--devbot/command.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/devbot/command.py b/devbot/command.py
index b3bd6fc..eb3a3cd 100644
--- a/devbot/command.py
+++ b/devbot/command.py
@@ -6,7 +6,7 @@ from devbot import config
def run(args, test=False, interactive=False, retry=0):
if test:
- print " ".join(args)
+ print(" ".join(args))
return
log_file = None
@@ -23,13 +23,13 @@ def run(args, test=False, interactive=False, retry=0):
tries = tries + 1
subprocess.check_call(**subprocess_args)
break
- except subprocess.CalledProcessError, e:
- print "\nCommand failed, tail of %s\n" % config.log_path
+ except subprocess.CalledProcessError as e:
+ print("\nCommand failed, tail of %s\n" % config.log_path)
if config.log_path:
subprocess.call(["tail", config.log_path])
if tries < retry + 1:
- print "Retrying (attempt %d) in 1 minute" % tries
+ print("Retrying (attempt %d) in 1 minute" % tries)
time.sleep(60)
else:
raise e
@@ -42,6 +42,6 @@ def run_with_sudo(args, test=False, interactive=False, retry=0):
args_with_sudo = ["sudo"]
args_with_sudo.extend(args)
- print " ".join(args_with_sudo)
+ print(" ".join(args_with_sudo))
run(args_with_sudo, test=test, retry=retry, interactive=interactive)