summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/base.bbclass4
-rw-r--r--meta/classes/package.bbclass6
-rw-r--r--meta/classes/sanity.bbclass6
3 files changed, 10 insertions, 6 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 641316d1fa..196acdbb30 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -108,7 +108,7 @@ python base_do_fetch() {
try:
fetcher = bb.fetch2.Fetch(src_uri, localdata)
fetcher.download()
- except bb.fetch2.BBFetchException, e:
+ except bb.fetch2.BBFetchException as e:
raise bb.build.FuncFailed(e)
}
@@ -128,7 +128,7 @@ python base_do_unpack() {
try:
fetcher = bb.fetch2.Fetch(src_uri, localdata)
fetcher.unpack(rootdir)
- except bb.fetch2.BBFetchException, e:
+ except bb.fetch2.BBFetchException as e:
raise bb.build.FuncFailed(e)
}
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 () {
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
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index ac2314fdcf..766e97e916 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -235,12 +235,14 @@ def check_create_long_filename(filepath, pathname):
f = file(testfile, "w")
f.close()
os.remove(testfile)
- except IOError as (errno, strerror):
+ except IOError as e:
+ errno, strerror = e.args
if errno == 36: # ENAMETOOLONG
return "Failed to create a file with a long name in %s. Please use a filesystem that does not unreasonably limit filename length.\n" % pathname
else:
return "Failed to create a file in %s: %s.\n" % (pathname, strerror)
- except OSError as (errno, strerror):
+ except OSError as e:
+ errno, strerror = e.args
return "Failed to create %s directory in which to run long name sanity check: %s.\n" % (pathname, strerror)
return ""