diff --git a/plugins/tor/tor_ b/plugins/tor/tor_ index decdbf19..e8a935cd 100755 --- a/plugins/tor/tor_ +++ b/plugins/tor/tor_ @@ -58,10 +58,15 @@ import json import os import sys -import GeoIP -import stem -import stem.control -import stem.connection +try: + import GeoIP + import stem + import stem.control + import stem.connection +except ImportError: + # missing dependencies are reported via "autoconf" + # thus failure is acceptable here + pass default_torcachefile = 'munin_tor_country_stats.json' default_torconnectmethod = 'port' @@ -141,7 +146,7 @@ class TorPlugin(object): import stem except ImportError as e: - print('no ({})'.format(e)) + print('no (failed to import the required python module "stem": {})'.format(e)) try: import GeoIP @@ -528,7 +533,7 @@ def main(): provider.fetch() else: print('Unknown parameter "{}"'.format(param), file=sys.stderr) - sys.exit(1) + sys.exit(1) if __name__ == '__main__': main()