memory_compare script is broken in 20.04

Bug #1864709 reported by Rod Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
High
Maciej Kisielewski

Bug Description

Beginning with 20.04 pre-release versions, the memory_compare script (called by the memory/info job definition) is broken; it returns a failure and the following Python call traceback:

Traceback (most recent call last):
  File "./plainbox-provider-checkbox/bin/memory_compare", line 138, in <module>
    sys.exit(main())
  File "./plainbox-provider-checkbox/bin/memory_compare", line 101, in main
    installed_memory = HumanReadableBytes(get_installed_memory_size())
  File "./plainbox-provider-checkbox/bin/memory_compare", line 62, in get_installed_memory_size
    lshw.run(result)
  File "/usr/lib/python3/dist-packages/checkbox_support/parsers/lshwjson.py", line 47, in run
    self._parse_lshw(lshw, result)
  File "/usr/lib/python3/dist-packages/checkbox_support/parsers/lshwjson.py", line 34, in _parse_lshw
    if 'children' in lshw.keys():
AttributeError: 'list' object has no attribute 'keys'

This may be a regression of bug #1843063.

Related branches

Revision history for this message
Maciej Kisielewski (kissiel) wrote :

An array is still a valid JSON output, so I'm fixing checkbox-support to make it work.

MR proposed here:
https://code.launchpad.net/~kissiel/checkbox-support/+git/checkbox-support/+merge/379856

Changed in plainbox-provider-checkbox:
status: New → In Progress
assignee: nobody → Maciej Kisielewski (kissiel)
importance: Undecided → High
Changed in plainbox-provider-checkbox:
status: In Progress → Fix Committed
Changed in plainbox-provider-checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.