Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes when running on invalid files #4

Closed
sils opened this issue Jun 8, 2016 · 1 comment
Closed

Crashes when running on invalid files #4

sils opened this issue Jun 8, 2016 · 1 comment

Comments

@sils
Copy link

sils commented Jun 8, 2016

We have a test file with invalid python syntax somewhere so I can't run this as there's no way to ignore the file and apparently star destroyer doesn't deal with exceptions.

Traceback (most recent call last):
  File "/usr/lib64/python3.5/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/lasse/venvs/def/lib/python3.5/site-packages/star_destroyer.py", line 374, in <module>
    modules, import_map, usage_map = scan(root_path)
  File "/home/lasse/venvs/def/lib/python3.5/site-packages/star_destroyer.py", line 317, in scan
    modules = list(get_modules(root_path))
  File "/home/lasse/venvs/def/lib/python3.5/site-packages/star_destroyer.py", line 314, in get_modules
    yield (pkgpath, modpath, path, ast.parse(open(path).read()))
  File "/usr/lib64/python3.5/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 1
    The Zen of Python, by Tim Peters
          ^
SyntaxError: invalid syntax
@sils
Copy link
Author

sils commented Jun 8, 2016

related to #3

@sils sils mentioned this issue Jun 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant