tor: Minor improvements

- Minimize loading of Augeas since it takes time.

- Make some methods private

- PEP8 fixes
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2016-07-16 13:43:23 -04:00
1 parent 2afae80dd8
commit 70001c841f
4 files changed
+55 -52

No files matched your search

+1 -2
View File
@@ -77,7 +77,7 @@ def init():
hostname = status['hs_hostname']
hs_virtports = [port['virtport'] for port in status['hs_ports']]
if utils.is_enabled() and utils.is_running() and \
if status['enabled'] and status['is_running'] and \
status['hs_enabled'] and status['hs_hostname']:
hs_services = []
for service_type in SERVICES:
@@ -120,7 +120,6 @@ def update_hidden_service_domain(status=None):
services=status['hs_services'])
def diagnose():
"""Run diagnostics and return the results."""
results = []