summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-09-29 14:56:49 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-09-29 14:56:49 -0400
commit30aa912ed837ab8d5713d3eaf8bc88a528d6cc88 (patch)
tree4eab86a867fef1e080ca01ddf6bc1425dd9bcafd
parent16fe4e6c0f3413d833757688247fbc3633698447 (diff)
downloaddeheader-30aa912ed837ab8d5713d3eaf8bc88a528d6cc88.tar.gz
deheader-30aa912ed837ab8d5713d3eaf8bc88a528d6cc88.tar.bz2
deheader-30aa912ed837ab8d5713d3eaf8bc88a528d6cc88.tar.xz
deheader-30aa912ed837ab8d5713d3eaf8bc88a528d6cc88.zip
Windows portability patch from dilyan.palauzov@aegee.org.
The os.WIFEXITED and WEXITSTATUS macros aren't defined on Windows. With this change, the tool can still run as long as -v is not cranked up.
-rwxr-xr-xdeheader2
1 files changed, 1 insertions, 1 deletions
diff --git a/deheader b/deheader
index c031591..6c42866 100755
--- a/deheader
+++ b/deheader
@@ -1352,7 +1352,7 @@ def testcompile(source, maker, msg="", verbosity=0, showerrs=False):
start = time.time()
(status, output) = commands.getstatusoutput(command)
end = time.time()
- if (os.WIFEXITED(status) and os.WEXITSTATUS(status) != 0 and showerrs) or verbosity >= COMMAND_DEBUG:
+ if verbosity >= COMMAND_DEBUG or (showerrs and os.WIFEXITED(status) and os.WEXITSTATUS(status) != 0):
sys.stdout.write(output + "\n")
if status:
explain = "failed"