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

support for older python versions #5

Open
fireba11 opened this issue Sep 28, 2022 · 1 comment
Open

support for older python versions #5

fireba11 opened this issue Sep 28, 2022 · 1 comment

Comments

@fireba11
Copy link

fireba11 commented Sep 28, 2022

There are several widely used distros that don't have python 3.9, and it doesn't seem to work with even 3.8 never mind even older.

On Ubuntu 18.04 with python 3.6.9 and
on ubuntu 20.04 with python 3.8.10

Starting scan of:/
Scanning for Vulnerabilities:
Traceback (most recent call last):
File "creosote.py", line 226, in
main()
File "creosote.py", line 206, in main
scan(directory)
File "creosote.py", line 50, in scan
analyzer = Analyzer(filename, text)
File "creosote.py", line 83, in init
self.visit(root)
File "/usr/lib/python3.6/ast.py", line 253, in visit
return visitor(node)
File "/usr/lib/python3.6/ast.py", line 261, in generic_visit
self.visit(item)
File "/usr/lib/python3.6/ast.py", line 253, in visit
return visitor(node)
File "/usr/lib/python3.6/ast.py", line 261, in generic_visit
self.visit(item)
File "/usr/lib/python3.6/ast.py", line 253, in visit
return visitor(node)
File "/usr/lib/python3.6/ast.py", line 261, in generic_visit
self.visit(item)
File "/usr/lib/python3.6/ast.py", line 253, in visit
return visitor(node)
File "/usr/lib/python3.6/ast.py", line 261, in generic_visit
self.visit(item)
File "/usr/lib/python3.6/ast.py", line 253, in visit
return visitor(node)
File "/usr/lib/python3.6/ast.py", line 263, in generic_visit
self.visit(value)
File "/usr/lib/python3.6/ast.py", line 253, in visit
return visitor(node)
File "/usr/lib/python3.6/ast.py", line 263, in generic_visit
self.visit(value)
File "/usr/lib/python3.6/ast.py", line 253, in visit
return visitor(node)
File "creosote.py", line 132, in visit_Attribute
if ".getmembers()" in ast.unparse(for_node.iter) and for_node.parent.body:
AttributeError: module 'ast' has no attribute 'unparse'

@fireba11 fireba11 changed the title AttributeError: module 'ast' has no attribute 'unparse' support for older python versions Sep 28, 2022
@papalii
Copy link

papalii commented Oct 20, 2022

Same problem with Rocky Linux release 8.6 (Green Obsidian) and Python 3.6.8 (default, Sep 13 2022, 09:02:49)

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