mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
python: Normalize quotes with Black.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
11741543da
commit
6e4c3e41dc
@@ -15,14 +15,14 @@ def nagios_from_file(results_file: str) -> Tuple[int, str]:
|
||||
with open(results_file) as f:
|
||||
data = f.read().strip()
|
||||
except FileNotFoundError:
|
||||
state = 'UNKNOWN'
|
||||
state = "UNKNOWN"
|
||||
ret = 3
|
||||
data = "Results file is missing"
|
||||
else:
|
||||
pieces = data.split('|')
|
||||
pieces = data.split("|")
|
||||
|
||||
if not len(pieces) == 4:
|
||||
state = 'UNKNOWN'
|
||||
state = "UNKNOWN"
|
||||
ret = 3
|
||||
data = "Results file malformed"
|
||||
else:
|
||||
@@ -31,7 +31,7 @@ def nagios_from_file(results_file: str) -> Tuple[int, str]:
|
||||
time_diff = time.time() - timestamp
|
||||
if time_diff > 60 * 2:
|
||||
ret = 3
|
||||
state = 'UNKNOWN'
|
||||
state = "UNKNOWN"
|
||||
data = "Results file is stale"
|
||||
else:
|
||||
ret = int(pieces[1])
|
||||
|
||||
Reference in New Issue
Block a user