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:13:13 +0100 |
commit | 62d538fbe65cf61ebc5996b0d6eb7e4ec47b6ead (patch) | |
tree | 685b0c48785db94f4fc26f727932f8779bc2fb5a /bitbake/lib/prserv | |
parent | 039798a4d250665c66fd738dba4d07dc2ec70652 (diff) | |
download | poky-62d538fbe65cf61ebc5996b0d6eb7e4ec47b6ead.tar.gz |
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>
Diffstat (limited to 'bitbake/lib/prserv')
-rw-r--r-- | bitbake/lib/prserv/serv.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py index ecafe4f94d..2f488f4898 100644 --- a/bitbake/lib/prserv/serv.py +++ b/bitbake/lib/prserv/serv.py | |||
@@ -88,7 +88,7 @@ class PRServer(SimpleXMLRPCServer): | |||
88 | pid = os.fork() | 88 | pid = os.fork() |
89 | if pid > 0: | 89 | if pid > 0: |
90 | sys.exit(0) | 90 | sys.exit(0) |
91 | except OSError,e: | 91 | except OSError as e: |
92 | sys.stderr.write("1st fork failed: %d %s\n" % (e.errno, e.strerror)) | 92 | sys.stderr.write("1st fork failed: %d %s\n" % (e.errno, e.strerror)) |
93 | sys.exit(1) | 93 | sys.exit(1) |
94 | 94 | ||
@@ -101,7 +101,7 @@ class PRServer(SimpleXMLRPCServer): | |||
101 | pid = os.fork() | 101 | pid = os.fork() |
102 | if pid > 0: #parent | 102 | if pid > 0: #parent |
103 | sys.exit(0) | 103 | sys.exit(0) |
104 | except OSError,e: | 104 | except OSError as e: |
105 | sys.stderr.write("2nd fork failed: %d %s\n" % (e.errno, e.strerror)) | 105 | sys.stderr.write("2nd fork failed: %d %s\n" % (e.errno, e.strerror)) |
106 | sys.exit(1) | 106 | sys.exit(1) |
107 | 107 | ||
@@ -187,7 +187,7 @@ def stop_daemon(): | |||
187 | while 1: | 187 | while 1: |
188 | os.kill(pid,signal.SIGTERM) | 188 | os.kill(pid,signal.SIGTERM) |
189 | time.sleep(0.1) | 189 | time.sleep(0.1) |
190 | except OSError, err: | 190 | except OSError as err: |
191 | err = str(err) | 191 | err = str(err) |
192 | if err.find("No such process") > 0: | 192 | if err.find("No such process") > 0: |
193 | if os.path.exists(PRServer.pidfile): | 193 | if os.path.exists(PRServer.pidfile): |