summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-09 14:01:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-11 10:34:30 +0100
commit654eadfa30624c62018665da618287b6cb5c7e3c (patch)
treeddca0b2edbf92abfd7e7f6e9cd9c3499d704ea45 /bitbake/lib/bb/utils.py
parent5052bf92e40d8e0764a11e897f06d3d9c7c065e9 (diff)
downloadopenembedded-core-contrib-654eadfa30624c62018665da618287b6cb5c7e3c.tar.gz
bitbake: bitbake: Update logger.warn() -> logger.warning()
python deprecated logger.warn() in favour of logger.warning(). This is only used in bitbake code so we may as well just translate everything to avoid warnings under python 3. Its safe for python 2.7. (Bitbake rev: 676a5f592e8507e81b8f748d58acfea7572f8796) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 5e735d3fa7..2abf518ece 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -822,7 +822,7 @@ def copyfile(src, dest, newmtime = None, sstat = None):
if not sstat:
sstat = os.lstat(src)
except Exception as e:
- logger.warn("copyfile: stat of %s failed (%s)" % (src, e))
+ logger.warning("copyfile: stat of %s failed (%s)" % (src, e))
return False
destexists = 1
@@ -849,7 +849,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 as e:
- logger.warn("copyfile: failed to create symlink %s to %s (%s)" % (dest, target, e))
+ logger.warning("copyfile: failed to create symlink %s to %s (%s)" % (dest, target, e))
return False
if stat.S_ISREG(sstat[stat.ST_MODE]):
@@ -864,7 +864,7 @@ def copyfile(src, dest, newmtime = None, sstat = None):
shutil.copyfile(src, dest + "#new")
os.rename(dest + "#new", dest)
except Exception as e:
- logger.warn("copyfile: copy %s to %s failed (%s)" % (src, dest, e))
+ logger.warning("copyfile: copy %s to %s failed (%s)" % (src, dest, e))
return False
finally:
if srcchown:
@@ -875,13 +875,13 @@ def copyfile(src, dest, newmtime = None, sstat = None):
#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:
- logger.warn("copyfile: failed to copy special file %s to %s (%s)" % (src, dest, a))
+ logger.warning("copyfile: failed to copy special file %s to %s (%s)" % (src, 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 as e:
- logger.warn("copyfile: failed to chown/chmod %s (%s)" % (dest, e))
+ logger.warning("copyfile: failed to chown/chmod %s (%s)" % (dest, e))
return False
if newmtime: