[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [oonib/master] Handle empty bouncer_endpoints and collector_endpoints



commit 9437610ec476c2c20150a905fbeac7e01908c8b7
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date:   Sat May 21 21:19:52 2016 +0200

    Handle empty bouncer_endpoints and collector_endpoints
    
    * Set tor_data_dir to null in the default example
---
 oonib.conf.example   | 2 +-
 oonib/oonibackend.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/oonib.conf.example b/oonib.conf.example
index 0a5f4a5..95df448 100644
--- a/oonib.conf.example
+++ b/oonib.conf.example
@@ -28,7 +28,7 @@ main:
     stale_time: 3600
 
     tor_hidden_service: false
-    tor_datadir: test_datadir
+    tor_datadir: null
 
     bouncer_endpoints:
     - {type: tls, port: 10443, cert: "private/ssl-key-and-cert.pem"}
diff --git a/oonib/oonibackend.py b/oonib/oonibackend.py
index 18bacf0..33ea92d 100644
--- a/oonib/oonibackend.py
+++ b/oonib/oonibackend.py
@@ -162,12 +162,12 @@ if config.main.tor_hidden_service and \
     config.main.bouncer_endpoints   = [ {'type': 'onion', 'hsdir':   bouncer_hsdir} ]
     config.main.collector_endpoints = [ {'type': 'onion', 'hsdir': collector_hsdir} ]
 
-for endpoint_config in config.main.get('bouncer_endpoints'):
+for endpoint_config in config.main.get('bouncer_endpoints', []):
     print "Starting bouncer with config %s" % endpoint_config
     endpoint = getEndpoint(endpoint_config)
     createService(endpoint, 'bouncer', endpoint_config)
 
-for endpoint_config in config.main.get('collector_endpoints'):
+for endpoint_config in config.main.get('collector_endpoints', []):
     print "Starting collector with config %s" % endpoint_config
     endpoint = getEndpoint(endpoint_config)
     createService(endpoint, 'collector', endpoint_config)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits