Skip to content

Commit

Permalink
fix: convert list items to strings before exclude check is performed (#9
Browse files Browse the repository at this point in the history
)
  • Loading branch information
xoxys authored Jun 13, 2021
1 parent 75cfc01 commit 5892717
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prometheuspvesd/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Config():
},
"exclude_vmid": {
"default": [],
"env": "EXCLUDE_STATE",
"env": "EXCLUDE_VMID",
"file": True,
"type": environs.Env().list
},
Expand Down
4 changes: 2 additions & 2 deletions prometheuspvesd/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ def _exclude(self, pve_list):
if obj["template"] == 1:
continue

if obj["status"] in self.config.config["exclude_state"]:
if obj["status"] in map(str, self.config.config["exclude_state"]):
continue

if obj["vmid"] in self.config.config["exclude_vmid"]:
if obj["vmid"] in map(str, self.config.config["exclude_vmid"]):
continue

filtered.append(item.copy())
Expand Down

0 comments on commit 5892717

Please sign in to comment.