OpenSCAP / openscap-daemon

Manages continuous scans of your infrastructure
https://www.open-scap.org/tools/openscap-daemon
GNU Lesser General Public License v2.1
106 stars 32 forks source link

"oscapd-evaluate spec" traceback on Python 3 #75

Closed jan-cerny closed 8 years ago

jan-cerny commented 8 years ago

The code in bin/oscapd-evaluate uses .decode() method which is not available in Python3.

Please see the command that I am running and the resulting traceback:

[root@thinkpad openscap-daemon]# python3 bin/oscapd-evaluate spec --input tests/testing_data/ssg-fedora-ds.xml 
INFO:OpenSCAP Daemon one-off evaluator 0.1.3
INFO:Successfully imported 'docker' and 'Atomic.mount', container scanning enabled.
Traceback (most recent call last):
  File "bin/oscapd-evaluate", line 373, in <module>
    main()
  File "bin/oscapd-evaluate", line 239, in main
    spec.input_.set_contents(args.input_.read().decode("utf-8"))
AttributeError: 'str' object has no attribute 'decode'

This also causes that the test suite doesn't pass.

mpreisler commented 8 years ago

ae5ef53c1c8719d6cfafa4f962e1801478e26fa6