Module: deluge Branch: master Commit: 11d8332e434a836b440449c0a766dac8272bfedd
Author: Nick Lanham <[email protected]> Date: Mon Feb 28 14:03:39 2011 +0100 make sure we're in interactive mode before checking for screen --- deluge/ui/console/main.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deluge/ui/console/main.py b/deluge/ui/console/main.py index 0795d17..ddba4b5 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): -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.
