Commit 1a38e0ce authored by Stefan Behnel's avatar Stefan Behnel

Py3 fix

parent 76c776f4
...@@ -192,7 +192,7 @@ class Context(object): ...@@ -192,7 +192,7 @@ class Context(object):
return Errors.report_error(exc) return Errors.report_error(exc)
def run_pipeline(self, pipeline, source): def run_pipeline(self, pipeline, source):
err = None error = None
data = source data = source
try: try:
for phase in pipeline: for phase in pipeline:
...@@ -203,11 +203,13 @@ class Context(object): ...@@ -203,11 +203,13 @@ class Context(object):
except CompileError, err: except CompileError, err:
# err is set # err is set
Errors.report_error(err) Errors.report_error(err)
error = err
except InternalError, err: except InternalError, err:
# Only raise if there was not an earlier error # Only raise if there was not an earlier error
if Errors.num_errors == 0: if Errors.num_errors == 0:
raise raise
return (err, data) error = err
return (error, data)
def find_module(self, module_name, def find_module(self, module_name,
relative_to = None, pos = None, need_pxd = 1): relative_to = None, pos = None, need_pxd = 1):
......
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