Module: check_mk
Branch: master
Commit: 88bc03df8fcf6ec22fe7aabdb850fb00f8de6587
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=88bc03df8fcf6e…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Jan 28 12:13:25 2019 +0100
agent_aws: Minor cleanup
Change-Id: Ie528c4d6898142e0b0fe4ae6c6f54ff402d0f2b8
---
agents/special/agent_aws | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/agents/special/agent_aws b/agents/special/agent_aws
index 08eb0e3..b1d4bff 100755
--- a/agents/special/agent_aws
+++ b/agents/special/agent_aws
@@ -208,7 +208,7 @@ class AWSSectionCloudwatch(AWSSection):
)
try:
metrics = response['MetricDataResults']
- except KeyError, e:
+ except KeyError as e:
logging.info("%s: KeyError %s; Available are %s", self.name, e,
response.keys())
continue
content.extend(metrics)
@@ -277,7 +277,7 @@ class CostsAndUsage(AWSSectionGeneric):
)
try:
return response['ResultsByTime']
- except KeyError, e:
+ except KeyError as e:
logging.info("%s: KeyError %s; Available are %s", self.name, e,
response.keys())
return []
@@ -315,7 +315,7 @@ class SecurityGroups(AWSSectionGeneric):
response = self._client.describe_security_groups()
try:
return response['SecurityGroups']
- except KeyError, e:
+ except KeyError as e:
logging.info("%s: KeyError %s; Available are %s", self.name, e,
response.keys())
return []
@@ -348,7 +348,7 @@ class EC2Summary(AWSSectionGeneric):
response = self._client.describe_instances()
try:
reservations = response['Reservations']
- except KeyError, e:
+ except KeyError as e:
logging.info("%s: KeyError %s; Available are %s", self.name, e,
response.keys())
return {}
@@ -656,14 +656,14 @@ class EBSSummary(AWSSectionGeneric):
response = self._client.describe_volumes()
try:
volumes = {r['VolumeId']: r for r in response['Volumes']}
- except KeyError, e:
+ except KeyError as e:
logging.info("%s: KeyError %s; Available are %s", self.name, e,
response.keys())
volumes = {}
response = self._client.describe_volume_status()
try:
volume_states = {r['VolumeId']: r for r in
response['VolumeStatuses']}
- except KeyError, e:
+ except KeyError as e:
logging.info("%s: KeyError %s; Available are %s", self.name, e,
response.keys())
volume_states = {}
@@ -781,7 +781,7 @@ class Glacier(AWSSectionGeneric):
response = self._client.list_vaults()
try:
vaults = {r['VaultName']: r for r in response['VaultList']}
- except KeyError, e:
+ except KeyError as e:
logging.info("%s: KeyError %s; Available are %s", self.name, e,
response.keys())
vaults = {}
@@ -789,7 +789,7 @@ class Glacier(AWSSectionGeneric):
response = self._client.list_jobs(vaultName=vault_name)
try:
jobs = response['JobList']
- except KeyError, e:
+ except KeyError as e:
logging.info("%s/%s: KeyError %s; Available are %s", self.name,
vault_name, e,
response.keys())
jobs = []
@@ -826,7 +826,7 @@ class CloudTrail(AWSSectionGeneric):
response = self._client.describe_trails()
try:
trails = {trail['Name']: trail for trail in
response['trailList']}
- except KeyError, e:
+ except KeyError as e:
logging.info("%s: KeyError %s; Available are %s", self.name, e,
response.keys())
trails = {}