X-Git-Url: http://git.onelab.eu/?p=bootmanager.git;a=blobdiff_plain;f=source%2Futils.py;h=70f37fd917bca1e82b3a5c90f5261eaa64a6f16b;hp=5ad3ec7b61ade5e97773edef0c30505836a4a8dd;hb=bca9d15033c15123b21196e9f24fac8c1b84675d;hpb=1e11592251ab599965bb7dc88b631d14e9be1a60 diff --git a/source/utils.py b/source/utils.py index 5ad3ec7..70f37fd 100644 --- a/source/utils.py +++ b/source/utils.py @@ -7,6 +7,8 @@ # All rights reserved. # expected /proc/partitions format +from __future__ import print_function + import os, sys, shutil import subprocess import shlex @@ -75,7 +77,7 @@ def breakpoint (message, cmd = None): cmd = "/bin/sh" message = message + " -- Entering bash - type ^D to proceed" - print message + print(message) os.system(cmd) @@ -142,13 +144,13 @@ def sysexec(cmd, log=None, fsck=False, shell=False): if log is not None: log.write("sysexec (shell mode) >>> {}".format(cmd)) if VERBOSE_MODE: - print "sysexec (shell mode) >>> {}".format(cmd) + print("sysexec (shell mode) >>> {}".format(cmd)) else: prog = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE) if log is not None: log.write("sysexec >>> {}\n".format(cmd)) if VERBOSE_MODE: - print "sysexec >>> {}".format(cmd) + print("sysexec >>> {}".format(cmd)) except OSError: raise BootManagerException( "Unable to create instance of subprocess.Popen "