56 lines
2.2 KiB
Diff
56 lines
2.2 KiB
Diff
From 0e483c0882b58a1d605e104aa8c1d6c361243116 Mon Sep 17 00:00:00 2001
|
|
From: John Kacur <jkacur@redhat.com>
|
|
Date: Wed, 6 May 2020 03:47:06 -0400
|
|
Subject: [PATCH 11/17] rteval: sysstat: Some style changes suggested by
|
|
pylint-3
|
|
|
|
Some style changes suggested by pylint-3
|
|
|
|
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
---
|
|
rteval/modules/measurement/sysstat.py | 14 +++++++-------
|
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/rteval/modules/measurement/sysstat.py b/rteval/modules/measurement/sysstat.py
|
|
index cbad928326dc..5e68720e25ea 100644
|
|
--- a/rteval/modules/measurement/sysstat.py
|
|
+++ b/rteval/modules/measurement/sysstat.py
|
|
@@ -33,11 +33,11 @@ from rteval.modules import rtevalModulePrototype
|
|
class sysstat(rtevalModulePrototype):
|
|
def __init__(self, config, logger=None):
|
|
rtevalModulePrototype.__init__(self, 'measurement', 'sysstat', logger)
|
|
- self.__cfg = config
|
|
- self.__started = False
|
|
+ self.__cfg = config
|
|
+ self.__started = False
|
|
self.__logentry = 0
|
|
self.__bin_sadc = "/usr/lib64/sa/sadc" # FIXME: Do dynamically
|
|
- self.__datadir = os.path.join(self.__cfg.reportdir, 'sysstat')
|
|
+ self.__datadir = os.path.join(self.__cfg.reportdir, 'sysstat')
|
|
self.__datafile = os.path.join(self.__datadir, "sysstat.dat")
|
|
|
|
|
|
@@ -93,10 +93,10 @@ class sysstat(rtevalModulePrototype):
|
|
compr = bz2.BZ2Compressor(9)
|
|
cmpr = compr.compress(fp.read())
|
|
data = base64.b64encode(cmpr + compr.flush())
|
|
- data_n = rep_n.newTextChild(None, 'data', "\n"+"\n".join(textwrap.wrap(data,75))+"\n")
|
|
+ data_n = rep_n.newTextChild(None, 'data', "\n"+"\n".join(textwrap.wrap(data, 75))+"\n")
|
|
data_n.newProp('contents', 'sysstat/sar binary data')
|
|
- data_n.newProp('encoding','base64')
|
|
- data_n.newProp('compression','bz2')
|
|
+ data_n.newProp('encoding', 'base64')
|
|
+ data_n.newProp('compression', 'bz2')
|
|
fp.close()
|
|
del cmpr
|
|
del compr
|
|
@@ -154,4 +154,4 @@ if __name__ == '__main__':
|
|
|
|
xml = libxml2.newDoc('1.0')
|
|
xml.setRootElement(rep_n)
|
|
- xml.saveFormatFileEnc('-','UTF-8',1)
|
|
+ xml.saveFormatFileEnc('-', 'UTF-8', 1)
|
|
--
|
|
2.21.3
|
|
|