summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2019-09-03 07:49:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-03 10:18:58 +0100
commit3e21648723c0b2e0c806fc5a446a1ca253c9a62f (patch)
tree761d56d5bf785a011429f6cb388a8a090ee608b4 /bitbake/lib/bb
parent88a49ffbd8f415356be268ea68b01d6adacb93c2 (diff)
downloadpoky-3e21648723c0b2e0c806fc5a446a1ca253c9a62f.tar.gz
bitbake: utils: Fix movefile() exception handling with python3
* with python3 this fails with: File: 'bitbake/lib/bb/utils.py', lineno: 799, function: movefile 0795: try: 0796: os.rename(src, destpath) 0797: renamefailed = 0 0798: except Exception as e: *** 0799: if e[0] != errno.EXDEV: 0800: # Some random error. 0801: print("movefile: Failed to move", src, "to", dest, e) 0802: return None 0803: # Invalid cross-device-link 'bind' mounted or actually Cross-Device Exception: TypeError: 'OSError' object is not subscriptable (Bitbake rev: d6e43c443ddbbe467c4380c48d2bc28ae18504a1) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 0618e46fe6..3e90b6a306 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -780,7 +780,7 @@ def movefile(src, dest, newmtime = None, sstat = None):
780 os.rename(src, destpath) 780 os.rename(src, destpath)
781 renamefailed = 0 781 renamefailed = 0
782 except Exception as e: 782 except Exception as e:
783 if e[0] != errno.EXDEV: 783 if e.errno != errno.EXDEV:
784 # Some random error. 784 # Some random error.
785 print("movefile: Failed to move", src, "to", dest, e) 785 print("movefile: Failed to move", src, "to", dest, e)
786 return None 786 return None