1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-24 09:57:09 +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:
wodry 2019-03-18 07:18:44 +01:00 committed by GitHub
parent 914180fe54
commit 832ecbad40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ user toranon # or any other user/group that is running tor
group toranon
env.torcachefile 'munin_tor_country_stats.json'
env.torconnectmethod 'port'
env.torgeoippath "/usr/share/GeoIP/GeoIP.dat"
env.torgeoippath '/usr/share/GeoIP/GeoIP.dat'
env.tormaxcountries 15
env.torport 9051
env.torsocket '/var/run/tor/control'
@ -40,7 +40,7 @@ user toranon # or any other user/group that is running tor
group toranon
env.torcachefile 'munin_tor_country_stats.json'
env.torconnectmethod 'socket'
env.torgeoippath "/usr/share/GeoIP/GeoIP.dat"
env.torgeoippath '/usr/share/GeoIP/GeoIP.dat'
env.tormaxcountries 15
env.torport 9051
env.torsocket '/var/run/tor/control'
@ -70,7 +70,7 @@ except ImportError:
default_torcachefile = 'munin_tor_country_stats.json'
default_torconnectmethod = 'port'
default_torgeoippath = "/usr/share/GeoIP/GeoIP.dat"
default_torgeoippath = '/usr/share/GeoIP/GeoIP.dat'
default_tormaxcountries = 15
default_torport = 9051
default_torsocket = '/var/run/tor/control'
@ -445,10 +445,10 @@ class TorRouters(TorPlugin):
sys.exit(1)
else:
routers = response.split('\n')
onr = 0
for router in routers:
if router[0] == "r":
onr += 1
onr = 0
for router in routers:
if router[0] == "r":
onr += 1
print('routers.value {}'.format(onr))