aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/torouter-web/src/tui/utils/parsing.py6
1 files changed, 5 insertions, 1 deletions
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 = {}