Commit 1e2b6a18 authored by Sam Ruby's avatar Sam Ruby

Recover from 'eval' errors

parent 4b1e0da9
......@@ -10,8 +10,11 @@
# quote_char="'"
import sys
opts = zip(sys.argv[1::2],sys.argv[2::2])
opts = [[name.lstrip('-'), eval(value)] for name,value in opts]
opts = {}
for name,value in zip(sys.argv[1::2],sys.argv[2::2]):
name = name.lstrip('-')
try: opts[name] = eval(value)
except: opts[name] = value
from html5lib import liberalxmlparser, treewalkers, treebuilders, serializer
parser = liberalxmlparser.XHTMLParser(tree=treebuilders.getTreeBuilder('dom'))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment