mirror of
https://github.com/torproject/gettor.git
synced 2024-12-14 22:18:33 +00:00
Adapted to read config from file (it fails if file doesn't exists)
This commit is contained in:
parent
7a4c1c5076
commit
fc698384da
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user