1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-08-11 00:14:37 +00:00

Plugins weather_*: specify regular expressions as raw strings

New versions of flake8 already complain about the non-raw nature of the
strings (respectively the improper escaping in the regular expression).
This commit is contained in:
Lars Kruse 2019-08-13 23:03:07 +02:00
parent e5abdeeb12
commit ebdbf1a92c
3 changed files with 6 additions and 6 deletions

View file

@ -7,9 +7,9 @@ import urllib
url = 'http://www.weather.com/weather/today/%s'
re_tmp = re.compile('realTemp: "(\d+)"')
re_hum = re.compile('relativeHumidity: "(\d+)"')
re_loc = re.compile('locName: "([\w ]+)"')
re_tmp = re.compile(r'realTemp: "(\d+)"')
re_hum = re.compile(r'relativeHumidity: "(\d+)"')
re_loc = re.compile(r'locName: "([\w ]+)"')
# code = sys.argv[0][(sys.argv[0].rfind('_') + 1):]
code = os.environ.get('code', sys.argv[0][(sys.argv[0].rfind('_') + 1):])