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

Plugin sockstat-via-procfs: fix style issues

This commit is contained in:
Lars Kruse 2018-03-27 04:56:30 +02:00
parent 7f3ce96632
commit 86692d7021

View file

@ -20,13 +20,13 @@ fields = (
if len(sys.argv) > 1:
arg = sys.argv[1]
if arg == 'autoconfig':
print 'yes'
print('yes')
sys.exit(0)
if arg == 'config':
print 'graph_title sockstat'
print 'graph_category network'
print('graph_title sockstat')
print('graph_category network')
for name, label in fields:
print '%s.label %s' % (name, label)
print('%s.label %s' % (name, label))
sys.exit(0)
re_num = re.compile('(\d+)')
@ -34,6 +34,6 @@ sockstat = open('/proc/net/sockstat').read()
numbers = re_num.findall(sockstat)
for i, (name, label) in enumerate(fields):
print '%s.value %s' % (name, numbers[i])
print('%s.value %s' % (name, numbers[i]))
sys.exit(0)