Module: check_mk
Branch: master
Commit: 5df6f283410aeb8b16d0da92df50efccc0d8874a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5df6f283410aeb…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Jul 16 13:51:45 2018 +0200
Fixed catching multiple errors
Change-Id: I3cbed8ff7ebc99fad1802c00b3a1d14dea5e6514
---
checks/brocade_sys | 2 +-
checks/hr_mem | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/checks/brocade_sys b/checks/brocade_sys
index ecb06ad..bf28a10 100644
--- a/checks/brocade_sys
+++ b/checks/brocade_sys
@@ -31,7 +31,7 @@ def parse_brocade_sys(info):
"cpu_util" : int(info[0][0]),
"mem_used_percent" : int(info[0][1]),
}
- except IndexError, ValueError:
+ except (IndexError, ValueError):
return {}
diff --git a/checks/hr_mem b/checks/hr_mem
index 2025fdf..a84f4b0 100644
--- a/checks/hr_mem
+++ b/checks/hr_mem
@@ -45,7 +45,7 @@ def parse_hr_mem(info):
size = int(hrsize) * int(hrunits) / 1048576.0
used = int(hrused) * int(hrunits) / 1048576.0
parsed.setdefault(map_types[hrtype], []).append((hrdescr.lower(), size,
used))
- except ValueError, KeyError:
+ except (ValueError, KeyError):
pass
return parsed