From b0984f4e97cfd7a3274b1510c40e5d2bdf10b531 Mon Sep 17 00:00:00 2001 From: Jacob Appelbaum Date: Wed, 24 Aug 2011 16:42:14 +0200 Subject: use the system torrc by default here --- packages/torouter-web/src/tui/utils/parsing.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'packages/torouter-web/src/tui/utils') diff --git a/packages/torouter-web/src/tui/utils/parsing.py b/packages/torouter-web/src/tui/utils/parsing.py index 4d52c87..690d15d 100644 --- a/packages/torouter-web/src/tui/utils/parsing.py +++ b/packages/torouter-web/src/tui/utils/parsing.py @@ -6,7 +6,11 @@ import os, re class interfaces: def __init__(self,filename): self.filename = filename - self.fp = open(filename, "r") + try: + self.fp = open(filename, "r") + except: + # this will happen on our first run or at reboot + self.fp = open("/etc/tor/torrc", "r") self.wifi = {} self.eth1 = {} self.eth0 = {} -- cgit v1.2.3