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

[tor-commits] [gettor/master] Adapted to read config from file (it fails if file doesn't exists)



commit fc698384da9f48de6aef6f40cd3d33d7ee34c047
Author: ilv <ilv@xxxxxxxxxxxxxxxxxxxxxxxx>
Date:   Fri Jun 6 13:03:27 2014 -0400

    Adapted to read config from file (it fails if file doesn't exists)
---
 src/core_demo.py |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/core_demo.py b/src/core_demo.py
index 3513e46..d30f2a4 100644
--- a/src/core_demo.py
+++ b/src/core_demo.py
@@ -5,12 +5,11 @@
 
 import gettor
 
-core = gettor.Core()
-
 try:
+    core = gettor.Core('gettor.cfg')
     links = core.get_links('linux', 'en')
     print links
 except ValueError as e:
-    print "Value error! " + str(e)
+    print "Value error: " + str(e)
 except RuntimeError as e:
-    print "Internal error! " + str(e)
+    print "Internal error: " + str(e)



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