turn off multiprocessing if debug

This commit is contained in:
Robert Kubosz
2020-05-13 14:24:20 +02:00
parent 6a5878da93
commit da82f37421
+4 -1
View File
@@ -583,7 +583,10 @@ def main():
filenames = [f for f in os.listdir('.') if os.path.splitext(f)[1] == '.py'] filenames = [f for f in os.listdir('.') if os.path.splitext(f)[1] == '.py']
else: else:
filenames = [args.filename] filenames = [args.filename]
if args.debug:
for filename in filenames:
_build(filename, args)
else:
with Pool(cpu_count()) as p: with Pool(cpu_count()) as p:
p.starmap(_build, product(filenames, [args])) p.starmap(_build, product(filenames, [args]))