Module: check_mk
Branch: master
Commit: 00807d12d26fbb766f8a7ace05b3fff6de13a810
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=00807d12d26fbb…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Thu Dec 20 14:02:00 2018 +0100
EC: Minor cleanup
Change-Id: If21c957229e6bc25b973c3856b441ebd212e4f34
---
cmk/ec/main.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmk/ec/main.py b/cmk/ec/main.py
index 4e10814..0542d05 100644
--- a/cmk/ec/main.py
+++ b/cmk/ec/main.py
@@ -277,7 +277,7 @@ def drain_pipe(pipe):
if pipe in readable:
try:
data = os.read(pipe, 4096)
- if len(data) == 0: # END OF FILE!
+ if not data: # EOF
break
except Exception:
break # Error while reading
@@ -2499,7 +2499,7 @@ class Queries(object):
if len(parts) > 1:
break
data = self._socket.recv(4096)
- if len(data) == 0:
+ if not data:
if len(self._buffer) == 0:
raise StopIteration()
parts = [self._buffer, ""]