From 832ecbad40098fa84fa839ffa1129721ec45adb0 Mon Sep 17 00:00:00 2001 From: wodry Date: Mon, 18 Mar 2019 07:18:44 +0100 Subject: [PATCH] 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 --- plugins/tor/tor_ | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/tor/tor_ b/plugins/tor/tor_ index 89f047ca..630f9a42 100755 --- a/plugins/tor/tor_ +++ b/plugins/tor/tor_ @@ -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))