Skip to content

Commit

Permalink
fix(replication): Call items() in for statement for better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
znerol committed Apr 23, 2024
1 parent 3c1a6a0 commit 32d87a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pve_exporter/collector/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ def collect(self): # pylint: disable=missing-docstring

# Add metrics
label_values = [str(vmdata['id'])]
status = self._pve(f"nodes/{node}/replication/{vmdata['id']}/status").get().items()
for key, metric_value in status:
status = self._pve(f"nodes/{node}/replication/{vmdata['id']}/status").get()
for key, metric_value in status.items():
if key in metrics:
metrics[key].add_metric(label_values, metric_value)

Expand Down

0 comments on commit 32d87a5

Please sign in to comment.