We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6f0fdc commit b9903f9Copy full SHA for b9903f9
nisext/py3builder.py
@@ -1,6 +1,8 @@
1
""" distutils utilities for porting to python 3 within 2-compatible tree """
2
3
from __future__ import with_statement
4
+
5
+import sys
6
import re
7
import ast
8
from . import codegen
@@ -175,7 +177,13 @@ def doctest_markup(in_lines):
175
177
if expr == 'bytes':
176
178
# Any strings on the given line are byte strings
179
pre, mid, post = INDENT_SPLITTER.match(line).groups()
- res = byter(mid)
180
+ try:
181
+ res = byter(mid)
182
+ except:
183
+ err = sys.exc_info()[1]
184
+ print('Error "%s" parsing "%s"; skipping' %
185
+ (err, mid))
186
+ continue
187
res = pre + res + post
188
else:
189
# If expr starts with 'replace', implies "line.replace"
0 commit comments