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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy