|
6 | 6 |
|
7 | 7 | # currently a very literal translation of merge-rulesets.sh, but about five |
8 | 8 | # times faster |
9 | | - |
| 9 | +from __future__ import print_function |
| 10 | +pass |
10 | 11 | import os |
11 | 12 | from glob import glob |
12 | 13 | from subprocess import call |
@@ -60,18 +61,18 @@ def rulesize(): |
60 | 61 | call(sedcmd + [r"s/<!--.*?-->//g;/<!--/N;//ba", rulesets_fn]) |
61 | 62 | call(["sed", "-i", r":a;N;$!ba;s/\n//g;s/>[ ]*</></g;s/[ ]*to=/ to=/g;s/[ ]*from=/ from=/g;s/ \/>/\/>/g", rulesets_fn]) |
62 | 63 | call(["sed", "-i", r"s/<\/ruleset>/<\/ruleset>\n/g", rulesets_fn]) |
63 | | -print(("Crushed", crush, "bytes of rulesets into", rulesize())) |
| 64 | +print("Crushed", crush, "bytes of rulesets into", rulesize()) |
64 | 65 |
|
65 | 66 | try: |
66 | 67 | if 0 == call(["xmllint", "--noout", rulesets_fn]): |
67 | | - print((rulesets_fn, "passed XML validity test.")) |
| 68 | + print(rulesets_fn, "passed XML validity test.") |
68 | 69 | else: |
69 | | - print(("ERROR:", rulesets_fn, "failed XML validity test!")) |
| 70 | + print("ERROR:", rulesets_fn, "failed XML validity test!") |
70 | 71 | sys.exit(1) |
71 | 72 | except OSError as e: |
72 | 73 | if "No such file or directory" not in traceback.format_exc(): |
73 | 74 | raise |
74 | | - print(("WARNING: xmllint not present; validation of", rulesets_fn, " skipped.")) |
| 75 | + print("WARNING: xmllint not present; validation of", rulesets_fn, " skipped.") |
75 | 76 |
|
76 | 77 | # We make default.rulesets at build time, but it shouldn't have a variable |
77 | 78 | # timestamp |
|
0 commit comments