Cleaning up some comments from berker
This commit is contained in:
parent
765dba3e56
commit
5040c29946
@ -32,6 +32,10 @@ Command line options
|
|||||||
|
|
||||||
.. versionadded:: 0.9.11
|
.. versionadded:: 0.9.11
|
||||||
|
|
||||||
|
.. cmdoption:: --show_tracebacks
|
||||||
|
|
||||||
|
Print extended tracebacks for Hy exceptions.
|
||||||
|
|
||||||
.. cmdoption:: -v
|
.. cmdoption:: -v
|
||||||
|
|
||||||
Print the Hy version number and exit.
|
Print the Hy version number and exit.
|
||||||
|
@ -34,7 +34,7 @@ class HyError(Exception):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
from clint.textui import colored
|
from clint.textui import colored
|
||||||
except:
|
except Exception:
|
||||||
class colored:
|
class colored:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -75,9 +75,8 @@ def import_file_to_module(module_name, fpath):
|
|||||||
eval(ast_compile(_ast, fpath, "exec"), mod.__dict__)
|
eval(ast_compile(_ast, fpath, "exec"), mod.__dict__)
|
||||||
except (HyTypeError, LexException) as e:
|
except (HyTypeError, LexException) as e:
|
||||||
if e.source is None:
|
if e.source is None:
|
||||||
fp = open(fpath, 'rt')
|
with open(fpath, 'rt') as fp:
|
||||||
e.source = fp.read()
|
e.source = fp.read()
|
||||||
fp.close()
|
|
||||||
e.filename = fpath
|
e.filename = fpath
|
||||||
raise
|
raise
|
||||||
except Exception:
|
except Exception:
|
||||||
|
Loading…
Reference in New Issue
Block a user