From e3c30f1bca3e64d89ed06698d9f8a9da7bb74cf4 Mon Sep 17 00:00:00 2001 From: Paul Cuzner Date: Tue, 22 Aug 2017 12:08:56 +1200 Subject: [PATCH] minor fixes during PR review --- collectors/common.py | 2 +- collectors/mon.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/collectors/common.py b/collectors/common.py index 02bbf59..5f35915 100644 --- a/collectors/common.py +++ b/collectors/common.py @@ -100,7 +100,7 @@ def fread(file_name=None): """ Simple read function for files of a single value :param file_name: (str) file name to read - :return: (str) contents of the file, or null string for empty file + :return: (str) contents of the file, or null string for non-existent file """ if os.path.exists(file_name): with open(file_name, 'r') as f: diff --git a/collectors/mon.py b/collectors/mon.py index d7635d3..ed36e7c 100644 --- a/collectors/mon.py +++ b/collectors/mon.py @@ -22,7 +22,7 @@ class CephState(object): summary_data = [health_issue.get('summary', '') for health_issue in summary_list] self.summary = [health_desc for health_desc in summary_data - if health_desc.find('update your health monitoring') == -1] + if 'update your health monitoring' not in health_desc] def update(self, state_object): self.status = state_object.status -- 2.47.3