mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-08-09 15:33:49 +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:
parent
73f885e382
commit
7063330e03
17 changed files with 102 additions and 103 deletions
|
@ -3,7 +3,7 @@
|
|||
import os
|
||||
import re
|
||||
import sys
|
||||
import urllib
|
||||
from urllib.request import urlopen
|
||||
|
||||
url = 'http://www.weather.com/weather/today/%s'
|
||||
|
||||
|
@ -19,7 +19,7 @@ if not code:
|
|||
elif len(sys.argv) == 2 and sys.argv[1] == "autoconf":
|
||||
print("yes")
|
||||
elif len(sys.argv) == 2 and sys.argv[1] == "config":
|
||||
u = urllib.urlopen(url % code)
|
||||
u = urlopen(url % code)
|
||||
txt = u.read()
|
||||
u.close()
|
||||
|
||||
|
@ -39,7 +39,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config":
|
|||
|
||||
print('graph_args --base 1000 -l 0')
|
||||
else:
|
||||
u = urllib.urlopen(url % code)
|
||||
u = urlopen(url % code)
|
||||
txt = u.read()
|
||||
u.close()
|
||||
|
||||
|
@ -53,7 +53,7 @@ else:
|
|||
|
||||
if len(TMP_F_list):
|
||||
TMP_F = TMP_F_list[0]
|
||||
TMP_C = (int(TMP_F) - 32) * 5/9
|
||||
TMP_C = (int(TMP_F) - 32) * 5 / 9
|
||||
else:
|
||||
sys.exit(1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue