summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2019-09-04 07:37:27 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-06 11:58:50 +0100
commit6cd3eee5fa11465eccf166a0093355fe3567eb1b (patch)
tree839c40d51d08d7acf9f1503af4f0ae81bc91a825 /bitbake
parent01b8a8b54bc569e5ef3f5e6fc6abcee365ab25d9 (diff)
downloadpoky-6cd3eee5fa11465eccf166a0093355fe3567eb1b.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: 16415c6e0f9e3d5c9fd81c9aabaea11d61b14187) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-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 e438694082..7aaf9309bd 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -782,7 +782,7 @@ def movefile(src, dest, newmtime = None, sstat = None):
782 os.rename(src, destpath) 782 os.rename(src, destpath)
783 renamefailed = 0 783 renamefailed = 0
784 except Exception as e: 784 except Exception as e:
785 if e[0] != errno.EXDEV: 785 if e.errno != errno.EXDEV:
786 # Some random error. 786 # Some random error.
787 print("movefile: Failed to move", src, "to", dest, e) 787 print("movefile: Failed to move", src, "to", dest, e)
788 return None 788 return None