mdwsetup.py: Add missing `OS.' qualifier on `W...' calls.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 19 Oct 2019 16:07:52 +0000 (17:07 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 8 May 2020 11:22:05 +0000 (12:22 +0100)
Evidently this code hasn't been tested before.

mdwsetup.py

index a6ca3f4..94bce8a 100644 (file)
@@ -59,10 +59,10 @@ class SubprocessFailure (Exception):
     me.file = file
     me.rc = rc
   def __str__(me):
-    if WIFEXITED(me.rc):
-      return '%s failed (rc = %d)' % (me.file, WEXITSTATUS(me.rc))
-    elif WIFSIGNALED(me.rc):
-      return '%s died (signal %d)' % (me.file, WTERMSIG(me.rc))
+    if OS.WIFEXITED(me.rc):
+      return '%s failed (rc = %d)' % (me.file, OS.WEXITSTATUS(me.rc))
+    elif OS.WIFSIGNALED(me.rc):
+      return '%s died (signal %d)' % (me.file, OS.WTERMSIG(me.rc))
     else:
       return '%s died inexplicably' % (me.file)