Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0fce2c8

Browse filesBrowse files
committed
Store 'f' attribute so 'view source XML' in FF can work
1 parent 220466d commit 0fce2c8
Copy full SHA for 0fce2c8

1 file changed

+7Lines changed: 7 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎utils/make-sqlite.py‎

Copy file name to clipboardExpand all lines: utils/make-sqlite.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ def nomes_all(where=sys.argv[1:]):
5959
# pointing into the ruleset table.
6060
etree.strip_tags(tree,'target')
6161

62+
# Store the filename in the `f' attribute so "view source XML" for rules in
63+
# FF version can find it.
64+
try:
65+
tree.xpath("/ruleset")[0].attrib["f"] = os.path.basename(fi)
66+
except Exception as oops:
67+
print "Error setting attribute: f=", os.path.basename(fi), oops
68+
6269
ruleset_name = tree.xpath("/ruleset/@name")[0]
6370
c.execute('''INSERT INTO rulesets (name, contents) VALUES(?, ?)''', (ruleset_name, etree.tostring(tree)));
6471
ruleset_id = c.lastrowid

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.