Browse Source

Fixed a string format and a lint space issue

Kenny Woodson 8 years ago
parent
commit
92f3067979

+ 2 - 2
roles/lib_openshift/library/oc_obj.py

@@ -1450,7 +1450,7 @@ class OCObject(OpenShiftCLI):
         '''return a kind by name '''
         results = self._get(self.kind, name=self.name, selector=self.selector)
         if (results['returncode'] != 0 and 'stderr' in results and
-           '\"%s\" not found' % self.name in results['stderr']):
+                '\"{}\" not found'.format(self.name) in results['stderr']):
             results['returncode'] = 0
 
         return results
@@ -1647,7 +1647,7 @@ def main():
             force=dict(default=False, type='bool'),
             selector=dict(default=None, type='str'),
         ),
-        mutually_exclusive=[["content", "files"],["selector", "name"]],
+        mutually_exclusive=[["content", "files"], ["selector", "name"]],
 
         supports_check_mode=True,
     )

+ 1 - 1
roles/lib_openshift/src/ansible/oc_obj.py

@@ -23,7 +23,7 @@ def main():
             force=dict(default=False, type='bool'),
             selector=dict(default=None, type='str'),
         ),
-        mutually_exclusive=[["content", "files"],["selector", "name"]],
+        mutually_exclusive=[["content", "files"], ["selector", "name"]],
 
         supports_check_mode=True,
     )

+ 1 - 1
roles/lib_openshift/src/class/oc_obj.py

@@ -26,7 +26,7 @@ class OCObject(OpenShiftCLI):
         '''return a kind by name '''
         results = self._get(self.kind, name=self.name, selector=self.selector)
         if (results['returncode'] != 0 and 'stderr' in results and
-           '\"%s\" not found' % self.name in results['stderr']):
+                '\"{}\" not found'.format(self.name) in results['stderr']):
             results['returncode'] = 0
 
         return results