bitbake: lib: Use modern expcetion syntax
(Bitbake rev: a4a37b6a83faa62f61433122c4583e93e64f7372) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
a823c88839
commit
3e86a6cdde
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue