mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
make exception handling syntax consistent
Update exception handling syntax to use the modern style: except ExcType as localvar (Bitbake rev: dbf5f42b06bef81749b13aa99945cc1292a6676d) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
039798a4d2
commit
62d538fbe6
@@ -88,7 +88,7 @@ class PRServer(SimpleXMLRPCServer):
|
||||
pid = os.fork()
|
||||
if pid > 0:
|
||||
sys.exit(0)
|
||||
except OSError,e:
|
||||
except OSError as e:
|
||||
sys.stderr.write("1st fork failed: %d %s\n" % (e.errno, e.strerror))
|
||||
sys.exit(1)
|
||||
|
||||
@@ -101,7 +101,7 @@ class PRServer(SimpleXMLRPCServer):
|
||||
pid = os.fork()
|
||||
if pid > 0: #parent
|
||||
sys.exit(0)
|
||||
except OSError,e:
|
||||
except OSError as e:
|
||||
sys.stderr.write("2nd fork failed: %d %s\n" % (e.errno, e.strerror))
|
||||
sys.exit(1)
|
||||
|
||||
@@ -187,7 +187,7 @@ def stop_daemon():
|
||||
while 1:
|
||||
os.kill(pid,signal.SIGTERM)
|
||||
time.sleep(0.1)
|
||||
except OSError, err:
|
||||
except OSError as err:
|
||||
err = str(err)
|
||||
if err.find("No such process") > 0:
|
||||
if os.path.exists(PRServer.pidfile):
|
||||
|
||||
Reference in New Issue
Block a user