[arm/master] Correcting AttributeError

commit 69e196defd289e9e160cf938fc2b5228082ea5c4 Author: Damian Johnson <atagar@torproject.org> Date: Fri Jan 18 21:45:23 2013 -0800 Correcting AttributeError Fixing a couple AttributeError issues spotted by gsathya... https://trac.torproject.org/7988 https://trac.torproject.org/7978 And one introduced by moving stem's Flag enum. --- src/cli/connections/connPanel.py | 2 +- src/cli/menu/actions.py | 9 +++++++-- src/util/torTools.py | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/cli/connections/connPanel.py b/src/cli/connections/connPanel.py index 79bc3b4..ddfad9e 100644 --- a/src/cli/connections/connPanel.py +++ b/src/cli/connections/connPanel.py @@ -207,7 +207,7 @@ class ConnectionPanel(panel.Panel, threading.Thread): True if exit connections are permissable, false otherwise. """ - if not torTools.getOption("ORPort", None): + if not torTools.getConn().getOption("ORPort", None): return False # no ORPort policy = torTools.getConn().getExitPolicy() diff --git a/src/cli/menu/actions.py b/src/cli/menu/actions.py index 320373f..77357c9 100644 --- a/src/cli/menu/actions.py +++ b/src/cli/menu/actions.py @@ -11,7 +11,11 @@ import cli.graphing.graphPanel from util import connections, torTools, uiTools -from stem.util import str_tools +from stem.util import conf, str_tools + +CONFIG = conf.config_dict("arm", { + "features.log.showDuplicateEntries": False, +}) def makeMenu(): """ @@ -185,7 +189,8 @@ def makeLogMenu(logPanel): logMenu.add(cli.menu.item.MenuItem("Snapshot...", logPanel.showSnapshotPrompt)) logMenu.add(cli.menu.item.MenuItem("Clear", logPanel.clear)) - if logPanel.showDuplicates: label, arg = "Hide", False + if CONFIG["features.log.showDuplicateEntries"]: + label, arg = "Hide", False else: label, arg = "Show", True logMenu.add(cli.menu.item.MenuItem("%s Duplicates" % label, functools.partial(logPanel.setDuplicateVisability, arg))) diff --git a/src/util/torTools.py b/src/util/torTools.py index 0678177..2b375b8 100644 --- a/src/util/torTools.py +++ b/src/util/torTools.py @@ -1422,7 +1422,7 @@ class Controller: try: nsEntry = self.controller.get_network_status(entryFingerprint) - if not stem.descriptor.Flag.RUNNING in nsEntry.flags: + if not stem.Flag.RUNNING in nsEntry.flags: potentialMatches.remove((entryPort, entryFingerprint)) except stem.ControllerError: pass
participants (1)
-
atagar@torproject.org