From 11d8332e434a836b440449c0a766dac8272bfedd Mon Sep 17 00:00:00 2001 From: Nick Lanham Date: Mon, 28 Feb 2011 14:03:39 +0100 Subject: [PATCH] make sure we're in interactive mode before checking for screen --- deluge/ui/console/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deluge/ui/console/main.py b/deluge/ui/console/main.py index 0795d17e6..ddba4b59f 100644 --- a/deluge/ui/console/main.py +++ b/deluge/ui/console/main.py @@ -304,7 +304,7 @@ Please use commands from the command line, eg:\n no matches are found. """ - if isinstance(self.screen,deluge.ui.console.modes.legacy.Legacy): + if self.interactive and isinstance(self.screen,deluge.ui.console.modes.legacy.Legacy): return self.screen.match_torrent(string) ret = [] for tid, name in self.torrents: @@ -326,11 +326,11 @@ Please use commands from the command line, eg:\n def set_batch_write(self, batch): - if isinstance(self.screen,deluge.ui.console.modes.legacy.Legacy): + if self.interactive and isinstance(self.screen,deluge.ui.console.modes.legacy.Legacy): return self.screen.set_batch_write(batch) def tab_complete_torrent(self, line): - if isinstance(self.screen,deluge.ui.console.modes.legacy.Legacy): + if self.interactive and isinstance(self.screen,deluge.ui.console.modes.legacy.Legacy): return self.screen.tab_complete_torrent(line) def set_mode(self, mode):