diff options
author | Scott Garman <scott.a.garman@intel.com> | 2011-06-14 16:44:58 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-15 11:08:43 +0100 |
commit | dbf5f42b06bef81749b13aa99945cc1292a6676d (patch) | |
tree | 04b6a3bdb3b4dfcae58ad0e233eb700317736984 /lib/prserv/serv.py | |
parent | 9bff182a4ba9571679985b45b309990a6eddad14 (diff) | |
download | bitbake-dbf5f42b06bef81749b13aa99945cc1292a6676d.tar.gz |
make exception handling syntax consistent
Update exception handling syntax to use the modern style:
except ExcType as localvar
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/prserv/serv.py')
-rw-r--r-- | lib/prserv/serv.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/prserv/serv.py b/lib/prserv/serv.py index ecafe4f94..2f488f489 100644 --- a/lib/prserv/serv.py +++ b/lib/prserv/serv.py @@ -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): |