X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=python%2Fovs%2Fprocess.py;h=4e6d44095f63be83c178438104f51984bc6f6a8c;hb=dd1ba5b3f4425c8eba008d1a93b044da63466812;hp=094e085331832b9576208700db9d2c91759e34ed;hpb=991559357f6a03c3a5b70c053c8c2554aa8d5ee4;p=openvswitch diff --git a/python/ovs/process.py b/python/ovs/process.py index 094e0853..4e6d4409 100644 --- a/python/ovs/process.py +++ b/python/ovs/process.py @@ -1,4 +1,4 @@ -# Copyright (c) 2010 Nicira Networks +# Copyright (c) 2010, 2011 Nicira Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,13 +15,15 @@ import os import signal -def _signal_status_msg(type, signr): - s = "%s by signal %d" % (type, signr) + +def _signal_status_msg(type_, signr): + s = "%s by signal %d" % (type_, signr) for name in signal.__dict__: - if name.startswith("SIG") and signal.__dict__[name] == signr: + if name.startswith("SIG") and getattr(signal, name) == signr: return "%s (%s)" % (s, name) return s - + + def status_msg(status): """Given 'status', which is a process status in the form reported by waitpid(2) and returned by process_status(), returns a string describing