mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 18:38:30 +00:00
Fix "TabError: inconsistent use of tabs and spaces in indentation"
Fixes ``` munin-run tor_bandwidth File "/etc/munin/plugins/tor_bandwidth", line 450 if router[0] == "r": ^ IndentationError: expected an indented block ``` ans use single quotes constantly also for GeoIP.dat filename
This commit is contained in:
parent
914180fe54
commit
832ecbad40
1 changed files with 7 additions and 7 deletions
|
@ -29,7 +29,7 @@ user toranon # or any other user/group that is running tor
|
||||||
group toranon
|
group toranon
|
||||||
env.torcachefile 'munin_tor_country_stats.json'
|
env.torcachefile 'munin_tor_country_stats.json'
|
||||||
env.torconnectmethod 'port'
|
env.torconnectmethod 'port'
|
||||||
env.torgeoippath "/usr/share/GeoIP/GeoIP.dat"
|
env.torgeoippath '/usr/share/GeoIP/GeoIP.dat'
|
||||||
env.tormaxcountries 15
|
env.tormaxcountries 15
|
||||||
env.torport 9051
|
env.torport 9051
|
||||||
env.torsocket '/var/run/tor/control'
|
env.torsocket '/var/run/tor/control'
|
||||||
|
@ -40,7 +40,7 @@ user toranon # or any other user/group that is running tor
|
||||||
group toranon
|
group toranon
|
||||||
env.torcachefile 'munin_tor_country_stats.json'
|
env.torcachefile 'munin_tor_country_stats.json'
|
||||||
env.torconnectmethod 'socket'
|
env.torconnectmethod 'socket'
|
||||||
env.torgeoippath "/usr/share/GeoIP/GeoIP.dat"
|
env.torgeoippath '/usr/share/GeoIP/GeoIP.dat'
|
||||||
env.tormaxcountries 15
|
env.tormaxcountries 15
|
||||||
env.torport 9051
|
env.torport 9051
|
||||||
env.torsocket '/var/run/tor/control'
|
env.torsocket '/var/run/tor/control'
|
||||||
|
@ -70,7 +70,7 @@ except ImportError:
|
||||||
|
|
||||||
default_torcachefile = 'munin_tor_country_stats.json'
|
default_torcachefile = 'munin_tor_country_stats.json'
|
||||||
default_torconnectmethod = 'port'
|
default_torconnectmethod = 'port'
|
||||||
default_torgeoippath = "/usr/share/GeoIP/GeoIP.dat"
|
default_torgeoippath = '/usr/share/GeoIP/GeoIP.dat'
|
||||||
default_tormaxcountries = 15
|
default_tormaxcountries = 15
|
||||||
default_torport = 9051
|
default_torport = 9051
|
||||||
default_torsocket = '/var/run/tor/control'
|
default_torsocket = '/var/run/tor/control'
|
||||||
|
@ -445,10 +445,10 @@ class TorRouters(TorPlugin):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
routers = response.split('\n')
|
routers = response.split('\n')
|
||||||
onr = 0
|
onr = 0
|
||||||
for router in routers:
|
for router in routers:
|
||||||
if router[0] == "r":
|
if router[0] == "r":
|
||||||
onr += 1
|
onr += 1
|
||||||
|
|
||||||
print('routers.value {}'.format(onr))
|
print('routers.value {}'.format(onr))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue