diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-04-09 19:46:14 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-02 15:41:33 +0100 |
commit | ad543e2e41b7e86d83cf0518b096ef82627bf891 (patch) | |
tree | f8f3c5d4f759f3169a937db1da6858a11aa938fa /bitbake/lib/bb/utils.py | |
parent | 978b5c946683885a64ee9e7c2064ff696f05cddb (diff) | |
download | openembedded-core-ad543e2e41b7e86d83cf0518b096ef82627bf891.tar.gz openembedded-core-ad543e2e41b7e86d83cf0518b096ef82627bf891.tar.bz2 openembedded-core-ad543e2e41b7e86d83cf0518b096ef82627bf891.zip |
Apply the 2to3 print function transform
(Bitbake rev: ff2e28d0d9723ccd0e9dd635447b6d889cc9f597)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r-- | bitbake/lib/bb/utils.py | 22 |
1 files changed, 11 insertions, 11 deletions
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: |