aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-21 12:29:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-21 22:26:26 +0100
commitd13f0ac614f1d1e2ef2c8ddc71cbfcf76a8dc3f2 (patch)
tree79a30ec956b41355e9b863f0e18290f29abe4514 /meta/lib/oe
parent96ed92aded49fc47c7e407d36ba4f03dafee28cd (diff)
downloadopenembedded-core-contrib-d13f0ac614f1d1e2ef2c8ddc71cbfcf76a8dc3f2.tar.gz
meta: Update to modern exception syntax
Update older exception syntax to modern one required by python 3. Compatible with python 2.7. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/data.py2
-rw-r--r--meta/lib/oe/prservice.py2
-rw-r--r--meta/lib/oe/utils.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oe/data.py b/meta/lib/oe/data.py
index e49572177b..23a9067a60 100644
--- a/meta/lib/oe/data.py
+++ b/meta/lib/oe/data.py
@@ -13,5 +13,5 @@ def typed_value(key, d):
try:
return oe.maketype.create(d.getVar(key, True) or '', var_type, **flags)
- except (TypeError, ValueError), exc:
+ except (TypeError, ValueError) as exc:
bb.msg.fatal("Data", "%s: %s" % (key, str(exc)))
diff --git a/meta/lib/oe/prservice.py b/meta/lib/oe/prservice.py
index b0cbcb1fbc..9e5a0c9830 100644
--- a/meta/lib/oe/prservice.py
+++ b/meta/lib/oe/prservice.py
@@ -9,7 +9,7 @@ def prserv_make_conn(d, check = False):
if not conn.ping():
raise Exception('service not available')
d.setVar("__PRSERV_CONN",conn)
- except Exception, exc:
+ except Exception as exc:
bb.fatal("Connecting to PR service %s:%s failed: %s" % (host_params[0], host_params[1], str(exc)))
return conn
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index d1dfbfb95d..32d61794ee 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -264,7 +264,7 @@ class ThreadedWorker(Thread):
try:
func(self, *args, **kargs)
- except Exception, e:
+ except Exception as e:
print(e)
finally:
self.tasks.task_done()