commit 7a863f9fdda39f0f9a0d2cd572a283ba38fa37bf Author: Kamran Riaz Khan krkhan@inspirated.com Date: Sat Jul 16 00:49:42 2011 +0500
Catch conn.init() exception in case starter wants detached startup. --- src/gui/graphing/bandwidthStats.py | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/gui/graphing/bandwidthStats.py b/src/gui/graphing/bandwidthStats.py index 401302c..04dfda8 100644 --- a/src/gui/graphing/bandwidthStats.py +++ b/src/gui/graphing/bandwidthStats.py @@ -8,6 +8,7 @@ import gobject import gtk
from TorCtl import TorCtl +from starter import CONFIG from gui.graphing import graphStats from util import uiTools, torTools
@@ -17,7 +18,13 @@ class BandwidthStats(graphStats.GraphStats):
conn = torTools.getConn() if not conn.isAlive(): - conn.init() + try: + conn.init() + except ValueError: + if CONFIG['features.allowDetachedStartup']: + return + else: + raise
conn.setControllerEvents(["BW", "NEWDESC"]) conn.addEventListener(self)
tor-commits@lists.torproject.org