diff options
author | Peter Portante <peter.portante@redhat.com> | 2014-01-27 17:53:58 -0500 |
---|---|---|
committer | Peter Portante <peter.portante@redhat.com> | 2014-04-17 14:00:08 -0400 |
commit | 64aceb0949f58d23ae666a8ad9328f773456c137 (patch) | |
tree | f74a994aed32cd070a426c2185a91c1a6eedef92 | |
parent | fbcfcc43e7e4525729616b03ea653c95f7d141c8 (diff) | |
download | sos-64aceb0949f58d23ae666a8ad9328f773456c137.tar.gz |
Use os.path.join instead of hardcoded formatting
Signed-off-by: Peter Portante <peter.portante@redhat.com>
-rw-r--r-- | sos/plugins/sar.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sos/plugins/sar.py b/sos/plugins/sar.py index a89d27f1..bd794fc8 100644 --- a/sos/plugins/sar.py +++ b/sos/plugins/sar.py @@ -32,10 +32,10 @@ class Sar(Plugin,): if self.get_option("all_sar"): self.sa_size = 0 - self.add_copy_spec_limit("%s/sar[0-9]*" % self.sa_path, - sizelimit = self.sa_size) - self.add_copy_spec_limit("%s/sa[0-9]*" % self.sa_path, - sizelimit = self.sa_size) + self.add_copy_spec_limit(os.path.join(self.sa_path, "sar[0-9]*"), + sizelimit = self.sa_size) + self.add_copy_spec_limit(os.path.join(self.sa_path, "sa[0-9]*"), + sizelimit = self.sa_size) try: dirList = os.listdir(self.sa_path) except: @@ -64,7 +64,7 @@ class RedHatSar(Sar, RedHatPlugin): class DebianSar(Sar, DebianPlugin, UbuntuPlugin): """ Collect system activity reporter data """ - + sa_path = '/var/log/sysstat' # vim: et ts=4 sw=4 |