Skip to content

Commit

Permalink
fix: check machine id as some archives are with empty machine-id file (
Browse files Browse the repository at this point in the history
…#3747)

Signed-off-by: Chenlizhong <[email protected]>
  • Loading branch information
chenlizhong authored Apr 14, 2023
1 parent 2e8a0ab commit ed4b702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion insights/core/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def __init__(self, broker=None, system_id=None, stream=sys.stdout, incremental=F

def observer(self, comp, broker):
super(InsightsEvaluator, self).observer(comp, broker)
if self.system_id is None and Specs.machine_id in broker:
if self.system_id is None and Specs.machine_id in broker and broker[Specs.machine_id].content:
self.system_id = broker[Specs.machine_id].content[0].strip()

if self.release is None and Specs.redhat_release in broker and broker[Specs.redhat_release].content:
Expand Down

0 comments on commit ed4b702

Please sign in to comment.