Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ea9dd99

Browse files
author
James Graham
committed
Make parse.py work
1 parent d63374a commit ea9dd99

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

parse.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,13 @@ def printOutput(parser, document, opts):
9898
elif opts.html:
9999
kwargs = {}
100100
for opt in serializer.HTMLSerializer.options:
101-
kwargs[opt] = getattr(opts,opt)
102-
if not kwargs['quote_char']: del kwargs['quote_char']
101+
try:
102+
kwargs[opt] = getattr(opts,opt)
103+
except:
104+
pass
105+
if not kwargs['quote_char']:
106+
del kwargs['quote_char']
107+
103108
tokens = treewalkers.getTreeWalker(opts.treebuilder)(document)
104109
for text in serializer.HTMLSerializer(**kwargs).serialize(tokens, encoding='utf-8'):
105110
sys.stdout.write(text)

0 commit comments

Comments
 (0)