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

Issue #91: Fix interactive task creating in Python 2.6 #92

Closed jan-cerny closed 8 years ago

jan-cerny commented 8 years ago

ElementTree.iter() is not available in Python 2.6, it was introduced in 2.7.

Addressing:

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.6/site-packages/openscap_daemon/dbus_daemon.py", line 78, in GetProfileChoicesForInput
    input_file, tailoring_file
  File "/usr/lib/python2.6/site-packages/openscap_daemon/system.py", line 86, in get_profile_choices_for_input
    input_file, tailoring_file
  File "/usr/lib/python2.6/site-packages/openscap_daemon/oscap_helpers.py", line 96, in get_profile_choices_for_input
    input_tree, "http://checklists.nist.gov/xccdf/1.1", ret
  File "/usr/lib/python2.6/site-packages/openscap_daemon/oscap_helpers.py", line 82, in scrape_profiles
    for elem in tree.iter("{%s}Profile" % (namespace)):
AttributeError: ElementTree instance has no attribute 'iter'