Skip to content

Commit 0af82e1

Browse files
committed
pep8 / pylint cleanup
1 parent 5a35435 commit 0af82e1

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

utils/make-sqlite.py

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

55
import glob
66
import os
7-
import re
87
import sqlite3
98
import subprocess
109
import sys
@@ -42,12 +41,12 @@
4241
sys.exit(1)
4342

4443
# Remove comments to save space.
45-
etree.strip_tags(tree,etree.Comment)
44+
etree.strip_tags(tree, etree.Comment)
4645

4746
targets = xpath_host(tree)
4847
if not targets:
49-
print 'File %s has no targets' % fi
50-
sys.exit(1)
48+
print('File %s has no targets' % fi)
49+
sys.exit(1)
5150

5251
# Strip out the target tags. These aren't necessary in the DB because
5352
# targets are looked up in the target table, which has a foreign key
@@ -58,10 +57,10 @@
5857
# FF version can find it.
5958
xpath_ruleset(tree)[0].attrib["f"] = os.path.basename(fi).decode(encoding="UTF-8")
6059

61-
c.execute('''INSERT INTO rulesets (contents) VALUES(?)''', (etree.tostring(tree),));
60+
c.execute('''INSERT INTO rulesets (contents) VALUES(?)''', (etree.tostring(tree),))
6261
ruleset_id = c.lastrowid
6362
for target in targets:
64-
c.execute('''INSERT INTO targets (host, ruleset_id) VALUES(?, ?)''', (target, ruleset_id));
63+
c.execute('''INSERT INTO targets (host, ruleset_id) VALUES(?, ?)''', (target, ruleset_id))
6564

6665
conn.commit()
6766
conn.execute("VACUUM")

0 commit comments

Comments
 (0)