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

[tor-commits] [ooni-probe/master] Don't fail if the torrc key is missing.



commit c6588d11fa29f9414f1c103ba676db890c7ee701
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Tue Jan 14 15:20:45 2014 +0100

    Don't fail if the torrc key is missing.
---
 ooni/director.py |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ooni/director.py b/ooni/director.py
index a988ca0..3f538ca 100644
--- a/ooni/director.py
+++ b/ooni/director.py
@@ -327,9 +327,10 @@ class Director(object):
                     else:
                         bridges.append(bridge.strip())
             tor_config.Bridge = bridges
-
-        for i in config.tor.torrc.keys():
-            setattr(tor_config, i, config.tor.torrc[i])
+        
+        if config.tor.torrc:
+            for i in config.tor.torrc.keys():
+                setattr(tor_config, i, config.tor.torrc[i])
 
         tor_config.save()
 

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