From 3e86a6cddef330e08170887104f0aebae96183a6 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 9 May 2013 21:18:20 +0000 Subject: [PATCH] bitbake: lib: Use modern expcetion syntax (Bitbake rev: a4a37b6a83faa62f61433122c4583e93e64f7372) Signed-off-by: Richard Purdie --- bitbake/lib/bb/compat.py | 2 +- bitbake/lib/bb/process.py | 2 +- bitbake/lib/bb/siggen.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bitbake/lib/bb/compat.py b/bitbake/lib/bb/compat.py index ea4e23a008..440a2fbc8b 100644 --- a/bitbake/lib/bb/compat.py +++ b/bitbake/lib/bb/compat.py @@ -343,7 +343,7 @@ def worker(inqueue, outqueue, initializer=None, initargs=(), maxtasks=None): job, i, func, args, kwds = task try: result = (True, func(*args, **kwds)) - except Exception, e: + except Exception as e: result = (False, e) try: put((job, i, result)) diff --git a/bitbake/lib/bb/process.py b/bitbake/lib/bb/process.py index 1aeec788c1..afc8e9bd49 100644 --- a/bitbake/lib/bb/process.py +++ b/bitbake/lib/bb/process.py @@ -85,7 +85,7 @@ def _logged_communicate(pipe, log, input): rlist = rin try: r,w,e = select.select (rlist, [], []) - except OSError, e: + except OSError as e: if e.errno != errno.EINTR: raise diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index dece945969..1ff2ecc482 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py @@ -249,7 +249,7 @@ class SignatureGeneratorBasic(SignatureGenerator): os.fsync(fd) os.chmod(tmpfile, 0664) os.rename(tmpfile, sigfile) - except (OSError, IOError), err: + except (OSError, IOError) as err: try: os.unlink(tmpfile) except OSError: