Skip to content

Supporting Python 2.7.6 #1

@ahmadnazir

Description

@ahmadnazir

Hi,

I am running into a few errors when running with python 2.7.6 which is most certainly because the tool was developed using an earlier python version. Can you please share the version of python that was used to develop this tool?

More specifically, I am using Python 2.7.6. and I get the following error when I try to parse the cvrf elements:

./cvrfparse.py -f sample-xml/CVRF-1.1-cisco-sa-20110525-rvs4000.xml  --vuln all
Traceback (most recent call last):
  File "./cvrfparse.py", line 286, in <module>
    main(progname)
  File "./cvrfparse.py", line 281, in main
    cvrf_dispatch(cvrf_doc, parsables, collate_vuln=args.collate_vuln, strip_ns=args.strip_ns)
  File "./cvrfparse.py", line 151, in cvrf_dispatch
    cvrf_dump(results, strip_ns)
  File "./cvrfparse.py", line 130, in cvrf_dump
    f = codecs.EncodedFile(sys.stdout, input="UTF-8")
TypeError: EncodedFile() got an unexpected keyword argument 'input'
cvrfparse.py: TypeError: EncodedFile() got an unexpected keyword argument 'input'

This can easily be fixed fixed by changing the keyword to 'data_encoding' (or having no keyword at all which would make the tool backwards compatible.).

I would be happy to create a pull request for this change.

Thanks,
Ahmad

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions