]> git-server-git.apps.pok.os.sepia.ceph.com Git - cephmetrics.git/commitdiff
minor fixes during PR review 100/head
authorPaul Cuzner <pcuzner@redhat.com>
Tue, 22 Aug 2017 00:08:56 +0000 (12:08 +1200)
committerPaul Cuzner <pcuzner@redhat.com>
Tue, 22 Aug 2017 00:08:56 +0000 (12:08 +1200)
collectors/common.py
collectors/mon.py

index 02bbf59e41608af702fb7f3a0b0725f4e825aa32..5f35915aaf263a138070ecbf5d3dad5f3f9c432d 100644 (file)
@@ -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:
index d7635d304046e9e54942866191cfdfd1fbcc8640..ed36e7ca2c02a47781142d48ab5f9991a5d13d0e 100644 (file)
@@ -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