Skip to content

Commit

Permalink
--export-process-filter Filter using complete command #2824
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolargo committed Jun 9, 2024
1 parent 12dafcf commit 0791c7e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions glances/exports/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,10 @@ def build_export(self, stats):
for key, value in sorted(iteritems(stats)):
if isinstance(value, bool):
value = json_dumps(value)

if isinstance(value, list):
try:
value = value[0]
except IndexError:
value = ''
value = ' '.join([str(v) for v in value])

if isinstance(value, dict):
item_names, item_values = self.build_export(value)
item_names = [pre_key + key.lower() + str(i) for i in item_names]
Expand Down

0 comments on commit 0791c7e

Please sign in to comment.