1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Fix python style issues reported by flake8

Additionally some python2-only "print" statements are now compatible
with python3.
This commit is contained in:
Lars Kruse 2019-12-18 00:25:39 +01:00
parent 73f885e382
commit 7063330e03
17 changed files with 102 additions and 103 deletions

View file

@ -77,7 +77,7 @@ def parse_params():
data = params['core'].rsplit('_', 1)
handler = data.pop()
params['params'] = {
'handler': os.environ.get('qpshandler_%s' % handler, 'standard')
'handler': os.environ.get('qpshandler_%s' % handler, 'standard'),
}
if not data:
params['core'] = ''
@ -416,7 +416,7 @@ class SolrMuninGraph:
handler=self.params['params']['handler'],
core=self.params['core'],
cores_qps_cdefs='%s,%s' % (','.join(map(lambda x: 'qps_%s' % x, cores)),
','.join(['+'] * (len(cores)-1))),
','.join(['+'] * (len(cores) - 1))),
gorder=','.join(cores)
)
@ -512,4 +512,4 @@ if __name__ == '__main__':
SOLR_URL = '/' + SOLR_URL
mb = SolrMuninGraph(SOLR_HOST_PORT, SOLR_URL, params)
if hasattr(mb, params['op']):
print(getattr(mb, params['op'])(params['type']))
print(getattr(mb, params['op'])(params['type']))