summaryrefslogtreecommitdiff
path: root/meta/lib/oeqa
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/oeqa
parent96ed92aded49fc47c7e407d36ba4f03dafee28cd (diff)
downloadopenembedded-core-d13f0ac614f1d1e2ef2c8ddc71cbfcf76a8dc3f2.tar.gz
openembedded-core-d13f0ac614f1d1e2ef2c8ddc71cbfcf76a8dc3f2.tar.bz2
openembedded-core-d13f0ac614f1d1e2ef2c8ddc71cbfcf76a8dc3f2.zip
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/oeqa')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py4
-rw-r--r--meta/lib/oeqa/utils/qemutinyrunner.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 4bede3421c..695402fead 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -114,7 +114,7 @@ class QemuRunner:
try:
threadsock, threadport = self.create_socket()
self.server_socket, self.serverport = self.create_socket()
- except socket.error, msg:
+ except socket.error as msg:
logger.error("Failed to create listening socket: %s" % msg[1])
return False
@@ -192,7 +192,7 @@ class QemuRunner:
else:
self.ip = ips[0]
self.server_ip = ips[1]
- except IndexError, ValueError:
+ except (IndexError, ValueError):
logger.info("Couldn't get ip from qemu process arguments! Here is the qemu command line used:\n%s\nand output from runqemu:\n%s" % (cmdline, self.getOutput(output)))
self._dump_host()
self.stop()
diff --git a/meta/lib/oeqa/utils/qemutinyrunner.py b/meta/lib/oeqa/utils/qemutinyrunner.py
index e3d8c669e0..d6ce09645c 100644
--- a/meta/lib/oeqa/utils/qemutinyrunner.py
+++ b/meta/lib/oeqa/utils/qemutinyrunner.py
@@ -50,7 +50,7 @@ class QemuTinyRunner(QemuRunner):
self.server_socket.connect(self.socketfile)
bb.note("Created listening socket for qemu serial console.")
tries = 0
- except socket.error, msg:
+ except socket.error as msg:
self.server_socket.close()
bb.fatal("Failed to create listening socket.")
tries -= 1