mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
python3 only
This commit is contained in:
parent
4d9a7e2cab
commit
21341b5a00
1 changed files with 5 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
"""
|
"""
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
@ -7,7 +7,7 @@ zcash_flypool_hashrate_ - Munin plugin to monitor your zcash.flypool.org hashrat
|
||||||
|
|
||||||
=head1 APPLICABLE SYSTEMS
|
=head1 APPLICABLE SYSTEMS
|
||||||
|
|
||||||
All systems with "python" and "munin"
|
All systems with "python3" and "munin"
|
||||||
|
|
||||||
=head1 CONFIGURATION
|
=head1 CONFIGURATION
|
||||||
|
|
||||||
|
@ -42,20 +42,11 @@ GPLv2
|
||||||
=cut
|
=cut
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
import codecs
|
import codecs
|
||||||
|
|
||||||
try:
|
|
||||||
# python3
|
|
||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
from urllib.request import Request
|
from urllib.request import Request
|
||||||
except ImportError:
|
|
||||||
# python2
|
|
||||||
from urllib2 import urlopen
|
|
||||||
from urllib2 import Request
|
|
||||||
|
|
||||||
command = ''
|
command = ''
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue