summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-07 13:55:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-09 14:06:50 +0100
commit2ac4f8b39711209ba9323fc221c1dcd185da57ea (patch)
treecbaa1e573abd13c7827a5b4a57724fd884df148b /meta/classes/package.bbclass
parent00052fe69582f238166511e733d3ba875cbe0ad2 (diff)
downloadpoky-2ac4f8b39711209ba9323fc221c1dcd185da57ea.tar.gz
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>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 1a8da40fdb..96228b0bc0 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -777,7 +777,8 @@ python split_and_strip_files () {
777 try: 777 try:
778 ltarget = cpath.realpath(file, dvar, False) 778 ltarget = cpath.realpath(file, dvar, False)
779 s = cpath.lstat(ltarget) 779 s = cpath.lstat(ltarget)
780 except OSError, (err, strerror): 780 except OSError as e:
781 (err, strerror) = e.args
781 if err != errno.ENOENT: 782 if err != errno.ENOENT:
782 raise 783 raise
783 # Skip broken symlinks 784 # Skip broken symlinks
@@ -855,7 +856,8 @@ python split_and_strip_files () {
855 # Skip it if the target doesn't exist 856 # Skip it if the target doesn't exist
856 try: 857 try:
857 s = os.stat(fpath) 858 s = os.stat(fpath)
858 except OSError, (err, strerror): 859 except OSError as e:
860 (err, strerror) = e.args
859 if err != errno.ENOENT: 861 if err != errno.ENOENT:
860 raise 862 raise
861 continue 863 continue