summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorn darshan <dnarayan@redhat.com>2014-05-05 00:47:54 -0400
committerSahina Bose <sabose@redhat.com>2014-05-05 05:05:15 -0700
commit63f7ffadb466d914bd67d74bbde495e75367cfdb (patch)
treeae0403ceba56889e3ff1bc28de720919354c3672
parent7dde70e063024c4b8d915697c9d0381704523afc (diff)
gluster-nagios-common: PEP8 fixes.
fixed pep8 issues in glusternagios/glustercli.py tests/test_glustercli.py Change-Id: Iea9d12543f854dca322f774f3fc255d0716107ff Signed-off-by: n darshan <dnarayan@redhat.com> Reviewed-on: http://review.gluster.org/7670 Reviewed-by: Sahina Bose <sabose@redhat.com>
-rwxr-xr-xglusternagios/glustercli.py12
-rw-r--r--tests/test_glustercli.py4
2 files changed, 8 insertions, 8 deletions
diff --git a/glusternagios/glustercli.py b/glusternagios/glustercli.py
index 1304611..c424438 100755
--- a/glusternagios/glustercli.py
+++ b/glusternagios/glustercli.py
@@ -413,8 +413,8 @@ def _parseVolumeInfo(tree):
value['options'][o.find('name').text] = o.find('value').text
for d in el.findall('bricks/brick'):
brickDetail = {}
- #this try block is to maintain backward compatibility
- #it returns an empty list when gluster doesnot return uuid
+ # this try block is to maintain backward compatibility
+ # it returns an empty list when gluster doesnot return uuid
try:
brickDetail['name'] = d.find('name').text
brickDetail['hostUuid'] = d.find('hostUuid').text
@@ -454,11 +454,11 @@ def volumeInfo(volumeName=None, remoteServer=None):
def _parseVolumeQuotaStatus(out, isDisabled=False):
status_detail = {'status': VolumeQuotaStatus.OK,
- 'soft_ex_dirs': [],
- 'hard_ex_dirs': []}
+ 'soft_ex_dirs': [],
+ 'hard_ex_dirs': []}
- if isDisabled or out[0].startswith(
- 'quota: No quota') or out[0].find('not enabled') > -1:
+ if isDisabled or out[0].startswith('quota: No quota'
+ ) or out[0].find('not enabled') > -1:
status_detail['status'] = VolumeQuotaStatus.DISABLED
return status_detail
for line in out[2:]:
diff --git a/tests/test_glustercli.py b/tests/test_glustercli.py
index 78c9170..ebaeac4 100644
--- a/tests/test_glustercli.py
+++ b/tests/test_glustercli.py
@@ -1074,8 +1074,8 @@ class GlusterCliTests(TestCaseBase):
"volume demo-test-vol"], None
status = gcli.volumeQuotaStatus("test-vol")
exp_disabled_out = {'status': gcli.VolumeQuotaStatus.DISABLED,
- 'hard_ex_dirs': [],
- 'soft_ex_dirs': []}
+ 'hard_ex_dirs': [],
+ 'soft_ex_dirs': []}
self.assertEquals(status, exp_disabled_out)
mock_execCmd.return_value = 0, ["quota: No quota "
"configured on "