mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
clases/lib: Use modern exception syntax
Update older code to use modern exception handling syntax which is the form accepted by python 3. (From OE-Core rev: b010501cd089e649a68f683be0cf4d0aac90fbe3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -777,7 +777,8 @@ python split_and_strip_files () {
|
||||
try:
|
||||
ltarget = cpath.realpath(file, dvar, False)
|
||||
s = cpath.lstat(ltarget)
|
||||
except OSError, (err, strerror):
|
||||
except OSError as e:
|
||||
(err, strerror) = e.args
|
||||
if err != errno.ENOENT:
|
||||
raise
|
||||
# Skip broken symlinks
|
||||
@@ -855,7 +856,8 @@ python split_and_strip_files () {
|
||||
# Skip it if the target doesn't exist
|
||||
try:
|
||||
s = os.stat(fpath)
|
||||
except OSError, (err, strerror):
|
||||
except OSError as e:
|
||||
(err, strerror) = e.args
|
||||
if err != errno.ENOENT:
|
||||
raise
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user