Port some python2 plugins to python3

This commit is contained in:
Lars Kruse 2019-12-18 00:27:02 +01:00
parent 7063330e03
commit 86bee01637
7 changed files with 11 additions and 14 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3
# Copyright (C) 2009 Andreas Thienemann <andreas@bawue.net>
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3
# Copyright (C) 2009 Andreas Thienemann <andreas@bawue.net>
#

View File

@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#!/usr/bin/env python3
# Copyright (c) 2010 Christoph Heer (Christoph.Heer@googlemail.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a

View File

@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#!/usr/bin/env python3
# vim: set fileencoding=utf-8
#
# Munin plugin to show number of documents in Sphinx index

View File

@ -1,5 +1,4 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#!/usr/bin/env python3
# Copyright (C) 2014 Johann Schmitz <johann@j-schmitz.net>
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
munin US NOAA weather plugin (http://tgftp.nws.noaa.gov)
@ -13,7 +13,7 @@ Linux users might need to adjust the shebang.
"""
import sys
import urllib
from urllib.request import urlopen
import re
url = 'http://tgftp.nws.noaa.gov/data/observations/metar/decoded/%s.TXT'
@ -36,7 +36,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config":
print('graph_args --base 1000 -l 850 -u 1050 --rigid')
print('graph_scale no')
else:
u = urllib.urlopen(url % code)
u = urlopen(url % code)
txt = u.read()
u.close()

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
munin US NOAA weather plugin (http://tgftp.nws.noaa.gov)
@ -13,7 +13,7 @@ Linux users might need to adjust the shebang.
"""
import sys
import urllib
from urllib.request import urlopen
import re
url = 'http://tgftp.nws.noaa.gov/data/observations/metar/decoded/%s.TXT'
@ -36,7 +36,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config":
print('dewpoint.label Dew Point')
print('graph_args --base 1000 -l 0')
else:
u = urllib.urlopen(url % code)
u = urlopen(url % code)
txt = u.read()
u.close()