aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-04-26 17:31:09 +0100
committerBryn M. Reeves <bmr@redhat.com>2013-04-26 17:31:09 +0100
commit2a18d46423d1a500842dd70a04fb149451a3ceac (patch)
tree9084be5be1460ee7fa5d161a8c1c3b2a73a4418a
parent972bf4954f3cdabc563c1af37a8c72d7078d80af (diff)
downloadsos-2a18d46423d1a500842dd70a04fb149451a3ceac.tar.gz
Improve code formatting in nfsserver plug-in
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/nfsserver.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/sos/plugins/nfsserver.py b/sos/plugins/nfsserver.py
index d7464e08..897586d4 100644
--- a/sos/plugins/nfsserver.py
+++ b/sos/plugins/nfsserver.py
@@ -25,12 +25,16 @@ class NfsServer(Plugin, RedHatPlugin):
plugin_name = 'nfsserver'
def check_enabled(self):
- if self.policy().default_runlevel() in self.policy().runlevel_by_service("nfs"):
+ default_runlevel = self.policy().default_runlevel()
+ nfs_runlevels = self.policy().runlevel_by_service("nfs")
+ if default_runlevel in nfs_runlevels:
return True
try:
- if os.stat("/etc/exports")[ST_SIZE] > 0 or os.stat("/var/lib/nfs/xtab")[ST_SIZE] > 0:
- return True
+ exports = os.stat("/etc/exports")[ST_SIZE]
+ xtab = os.stat("/var/lib/nfs/xtab")[ST_SIZE]
+ if exports or xtab:
+ return True
except:
pass