Skip to content

Commit 0cc8b6d

Browse files
committed
chore: Fix linting errors
1 parent 79f5d90 commit 0cc8b6d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

vmware_exporter/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
def get_bool_env(key: str, default: bool):
77
value = os.environ.get(key, default)
8-
return value if type(value) == bool else value.lower() == 'true'
8+
return value if value is bool else value.lower() == 'true'
99

1010

1111
def batch_fetch_properties(content, obj_type, properties):

vmware_exporter/vmware_exporter.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,8 +1722,8 @@ def _vmware_get_hosts(self, host_metrics):
17221722

17231723
# Numeric Sensor Info
17241724
sensors = host.get('runtime.healthSystemRuntime.systemHealthInfo.numericSensorInfo', '').split(',') + \
1725-
host.get('runtime.healthSystemRuntime.hardwareStatusInfo.cpuStatusInfo', '').split(',') + \
1726-
host.get('runtime.healthSystemRuntime.hardwareStatusInfo.memoryStatusInfo', '').split(',')
1725+
host.get('runtime.healthSystemRuntime.hardwareStatusInfo.cpuStatusInfo', '').split(',') + \
1726+
host.get('runtime.healthSystemRuntime.hardwareStatusInfo.memoryStatusInfo', '').split(',')
17271727

17281728
sensors = [s for s in sensors if ':' in s]
17291729

@@ -1909,10 +1909,11 @@ def _vmware_get_volumes(self, vol_metrics):
19091909
snapshot.id.id,
19101910
], int(snapshot.createTime.timestamp()))
19111911
except vim.fault.NotFound:
1912-
logging.error("Snapshot info for volume %s not found",volume_ref.id)
1912+
logging.error("Snapshot info for volume %s not found", volume_ref.id)
19131913
except Exception as error:
19141914
logging.error("Error fetching snapshot information for volume: %s", volume_ref.id, error)
19151915

1916+
19161917
class ListCollector(object):
19171918

19181919
def __init__(self, metrics):

0 commit comments

Comments
 (0)