bitbake: lib: Use modern expcetion syntax

(Bitbake rev: a4a37b6a83faa62f61433122c4583e93e64f7372)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2013-05-09 21:18:20 +00:00
parent a823c88839
commit 3e86a6cdde
3 changed files with 3 additions and 3 deletions

View File

@ -343,7 +343,7 @@ def worker(inqueue, outqueue, initializer=None, initargs=(), maxtasks=None):
job, i, func, args, kwds = task job, i, func, args, kwds = task
try: try:
result = (True, func(*args, **kwds)) result = (True, func(*args, **kwds))
except Exception, e: except Exception as e:
result = (False, e) result = (False, e)
try: try:
put((job, i, result)) put((job, i, result))

View File

@ -85,7 +85,7 @@ def _logged_communicate(pipe, log, input):
rlist = rin rlist = rin
try: try:
r,w,e = select.select (rlist, [], []) r,w,e = select.select (rlist, [], [])
except OSError, e: except OSError as e:
if e.errno != errno.EINTR: if e.errno != errno.EINTR:
raise raise

View File

@ -249,7 +249,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
os.fsync(fd) os.fsync(fd)
os.chmod(tmpfile, 0664) os.chmod(tmpfile, 0664)
os.rename(tmpfile, sigfile) os.rename(tmpfile, sigfile)
except (OSError, IOError), err: except (OSError, IOError) as err:
try: try:
os.unlink(tmpfile) os.unlink(tmpfile)
except OSError: except OSError: