Tidy up the code a bit more after that last fix.

This commit is contained in:
Sei Lisa 2015-08-18 21:16:46 +02:00
parent ed6603c3cd
commit 8a8e255239

View file

@ -465,15 +465,13 @@ def main():
# Invoke the external preprocessor # Invoke the external preprocessor
import subprocess import subprocess
stdout = ''
p = subprocess.Popen(preproc_cmdline, stdin=subprocess.PIPE, p = subprocess.Popen(preproc_cmdline, stdin=subprocess.PIPE,
stdout=subprocess.PIPE) stdout=subprocess.PIPE)
stdout = p.communicate(input=script)[0] script = p.communicate(input=script)[0]
status = p.wait() status = p.wait()
if status: if status:
return status return status
script = stdout del p, status
del p, status, stdout
for x in re.findall(r'(?:(?<=\n)|^)\s*#\s*define\s+(' for x in re.findall(r'(?:(?<=\n)|^)\s*#\s*define\s+('
r'USE_SWITCHES' r'USE_SWITCHES'