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

Hang on some python files #55

Closed
tholin opened this issue Jan 8, 2015 · 2 comments
Closed

Hang on some python files #55

tholin opened this issue Jan 8, 2015 · 2 comments

Comments

@tholin
Copy link

tholin commented Jan 8, 2015

Lizard gets stuck on some python files. Sample
https://www.dropbox.com/s/wjl70kodhb3qtlu/cp037.py

$ ~/repository/lizard/lizard cp037.py 
========================================
  NLOC    CCN   token  PARAM  location  
----------------------------------------
^C
Traceback (most recent call last):
  File "/home/cocobo/repository/lizard/lizard", line 6, in <module>
    lizard_main(sys.argv)
  File "/home/cocobo/repository/lizard/lizard.py", line 944, in lizard_main
    printer(result, options)
  File "/home/cocobo/repository/lizard/lizard.py", line 821, in print_result
    code_infos, option.extensions, scheme)
  File "/home/cocobo/repository/lizard/lizard.py", line 789, in print_and_save_modules
    for module_info in all_modules:
  File "/home/cocobo/repository/lizard/lizard.py", line 644, in __call__
    filename, open(filename, 'rU').read())
  File "/home/cocobo/repository/lizard/lizard.py", line 653, in analyze_source_code
    tokens = reader.generate_tokens(code)
  File "/home/cocobo/repository/lizard/lizard_ext/python.py", line 23, in generate_tokens
    r"|\'\'\'.*?\'\'\'" + r'|\"\"\".*?\"\"\"')
  File "/home/cocobo/repository/lizard/lizard.py", line 367, in generate_tokens
    return [t for t in _generate_tokens(source_code, addition)]
  File "/home/cocobo/repository/lizard/lizard.py", line 352, in _generate_tokens
    for token in token_pattern.findall(source_code):
KeyboardInterrupt
@terryyin
Copy link
Owner

terryyin commented Jan 8, 2015

@tholin thanks for all these report. I will get them fixed.

@terryyin
Copy link
Owner

terryyin commented Jan 9, 2015

This one is fixed! Now I know a better way of parsing strings.

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

2 participants