Skip to content

Commit bf61a97

Browse files
author
Osama
committed
Use print_function. This will require python2.6+.
1 parent 9fbe7fa commit bf61a97

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

utils/merge-rulesets.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
# currently a very literal translation of merge-rulesets.sh, but about five
88
# times faster
9-
9+
from __future__ import print_function
10+
pass
1011
import os
1112
from glob import glob
1213
from subprocess import call
@@ -60,18 +61,18 @@ def rulesize():
6061
call(sedcmd + [r"s/<!--.*?-->//g;/<!--/N;//ba", rulesets_fn])
6162
call(["sed", "-i", r":a;N;$!ba;s/\n//g;s/>[ ]*</></g;s/[ ]*to=/ to=/g;s/[ ]*from=/ from=/g;s/ \/>/\/>/g", rulesets_fn])
6263
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())
6465

6566
try:
6667
if 0 == call(["xmllint", "--noout", rulesets_fn]):
67-
print((rulesets_fn, "passed XML validity test."))
68+
print(rulesets_fn, "passed XML validity test.")
6869
else:
69-
print(("ERROR:", rulesets_fn, "failed XML validity test!"))
70+
print("ERROR:", rulesets_fn, "failed XML validity test!")
7071
sys.exit(1)
7172
except OSError as e:
7273
if "No such file or directory" not in traceback.format_exc():
7374
raise
74-
print(("WARNING: xmllint not present; validation of", rulesets_fn, " skipped."))
75+
print("WARNING: xmllint not present; validation of", rulesets_fn, " skipped.")
7576

7677
# We make default.rulesets at build time, but it shouldn't have a variable
7778
# timestamp

0 commit comments

Comments
 (0)