diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3ffe128..37e87b2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,8 @@ repos: stages: [commit] - id: detect-aws-credentials stages: [commit] + args: + - --allow-missing-credentials # Generic file state - id: trailing-whitespace stages: [commit] @@ -45,6 +47,7 @@ repos: - id: dockerfilelint stages: [commit] - repo: https://github.com/mattlqx/pre-commit-sign - rev: v1.1.1 + rev: v1.1.3 hooks: - id: sign-commit + stages: [commit-msg] diff --git a/vmware_exporter/vmware_exporter.py b/vmware_exporter/vmware_exporter.py index adca198..e497fa2 100755 --- a/vmware_exporter/vmware_exporter.py +++ b/vmware_exporter/vmware_exporter.py @@ -1094,7 +1094,7 @@ def vm_labels(self): if 'summary.config.vmPathName' in row: p = row['summary.config.vmPathName'] - if p[0] == '[': + if p.startswith('['): p = p[1:p.find("]")] else: p = 'n/a'