From ad543e2e41b7e86d83cf0518b096ef82627bf891 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Fri, 9 Apr 2010 19:46:14 -0700 Subject: Apply the 2to3 print function transform (Bitbake rev: ff2e28d0d9723ccd0e9dd635447b6d889cc9f597) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/utils.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'bitbake/lib/bb/utils.py') diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 5c6aafd1fa..7446be875d 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py @@ -562,7 +562,7 @@ def movefile(src, dest, newmtime = None, sstat = None): if not sstat: sstat = os.lstat(src) except Exception, e: - print "movefile: Stating source file failed...", e + print("movefile: Stating source file failed...", e) return None destexists = 1 @@ -590,7 +590,7 @@ def movefile(src, dest, newmtime = None, sstat = None): os.unlink(src) return os.lstat(dest) except Exception, e: - print "movefile: failed to properly create symlink:", dest, "->", target, e + print("movefile: failed to properly create symlink:", dest, "->", target, e) return None renamefailed = 1 @@ -601,7 +601,7 @@ def movefile(src, dest, newmtime = None, sstat = None): except Exception, e: if e[0] != errno.EXDEV: # Some random error. - print "movefile: Failed to move", src, "to", dest, e + print("movefile: Failed to move", src, "to", dest, e) return None # Invalid cross-device-link 'bind' mounted or actually Cross-Device @@ -613,13 +613,13 @@ def movefile(src, dest, newmtime = None, sstat = None): os.rename(dest + "#new", dest) didcopy = 1 except Exception, e: - print 'movefile: copy', src, '->', dest, 'failed.', e + print('movefile: copy', src, '->', dest, 'failed.', e) return None else: #we don't yet handle special, so we need to fall back to /bin/mv a = getstatusoutput("/bin/mv -f " + "'" + src + "' '" + dest + "'") if a[0] != 0: - print "movefile: Failed to move special file:" + src + "' to '" + dest + "'", a + print("movefile: Failed to move special file:" + src + "' to '" + dest + "'", a) return None # failure try: if didcopy: @@ -627,7 +627,7 @@ def movefile(src, dest, newmtime = None, sstat = None): os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown os.unlink(src) except Exception, e: - print "movefile: Failed to chown/chmod/unlink", dest, e + print("movefile: Failed to chown/chmod/unlink", dest, e) return None if newmtime: @@ -648,7 +648,7 @@ def copyfile(src, dest, newmtime = None, sstat = None): if not sstat: sstat = os.lstat(src) except Exception, e: - print "copyfile: Stating source file failed...", e + print("copyfile: Stating source file failed...", e) return False destexists = 1 @@ -675,7 +675,7 @@ def copyfile(src, dest, newmtime = None, sstat = None): #os.lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID]) return os.lstat(dest) except Exception, e: - print "copyfile: failed to properly create symlink:", dest, "->", target, e + print("copyfile: failed to properly create symlink:", dest, "->", target, e) return False if stat.S_ISREG(sstat[stat.ST_MODE]): @@ -683,19 +683,19 @@ def copyfile(src, dest, newmtime = None, sstat = None): shutil.copyfile(src, dest + "#new") os.rename(dest + "#new", dest) except Exception, e: - print 'copyfile: copy', src, '->', dest, 'failed.', e + print('copyfile: copy', src, '->', dest, 'failed.', e) return False else: #we don't yet handle special, so we need to fall back to /bin/mv a = getstatusoutput("/bin/cp -f " + "'" + src + "' '" + dest + "'") if a[0] != 0: - print "copyfile: Failed to copy special file:" + src + "' to '" + dest + "'", a + print("copyfile: Failed to copy special file:" + src + "' to '" + dest + "'", a) return False # failure try: os.lchown(dest, sstat[stat.ST_UID], sstat[stat.ST_GID]) os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown except Exception, e: - print "copyfile: Failed to chown/chmod/unlink", dest, e + print("copyfile: Failed to chown/chmod/unlink", dest, e) return False if newmtime: -- cgit v1.2.3-54-g00ecf