Skip to content

Commit 7903216

Browse files
authored
Update splitSources.py
1 parent c9ef7a6 commit 7903216

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/splitSources.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
#
33
# This script reads a syntaxTest file and writes all
4-
# sources into their own files. If one source-name specifies subdirectories
4+
# sources into separate files. If a source name specifies subdirectories,
55
# those will be created too.
66

77
# Usage: scripts/splitSources.py pathToTestfile
@@ -18,7 +18,7 @@ def uncaught_exception_hook(exc_type, exc_value, exc_traceback):
1818
# The script `scripts/ASTImportTest.sh` will interpret return code 3
1919
# as a critical error (because of the uncaught exception) and will
2020
# terminate further execution.
21-
print("Unhandled exception: %s", "".join(traceback.format_exception(exc_type, exc_value, exc_traceback)))
21+
print("Unhandled exception:" + "".join(traceback.format_exception(exc_type, exc_value, exc_traceback)))
2222
sys.exit(3)
2323

2424

@@ -42,7 +42,7 @@ def writeSourceToFile(lines):
4242
with open(srcName, mode='a+', encoding='utf8', newline='') as f:
4343
for idx, line in enumerate(lines[1:]):
4444
# write to file
45-
if line[:12] != "==== Source:":
45+
if not line.startswith("==== Source:"):
4646
f.write(line + '\n')
4747

4848
# recursive call if there is another source

0 commit comments

Comments
 (0)