From 322495cfd58a94532400caf7cab97795ad43d24c Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 25 Apr 2009 22:42:46 +0000 Subject: [PATCH] Fix 'debug' command and update some copyright headers --- deluge/ui/console/commands/config.py | 2 +- deluge/ui/console/commands/connect.py | 1 + deluge/ui/console/commands/debug.py | 14 +++++++------- deluge/ui/console/commands/quit.py | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/deluge/ui/console/commands/config.py b/deluge/ui/console/commands/config.py index bf0bd908a..6fc3da1e9 100644 --- a/deluge/ui/console/commands/config.py +++ b/deluge/ui/console/commands/config.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python # # config.py # # Copyright (C) 2008-2009 Ido Abramovich +# Copyright (C) 2009 Andrew Resch # # Deluge is free software. # diff --git a/deluge/ui/console/commands/connect.py b/deluge/ui/console/commands/connect.py index 0ebbcea3b..62a7d7e08 100644 --- a/deluge/ui/console/commands/connect.py +++ b/deluge/ui/console/commands/connect.py @@ -2,6 +2,7 @@ # connect.py # # Copyright (C) 2008-2009 Ido Abramovich +# Copyright (C) 2009 Andrew Resch # # Deluge is free software. # diff --git a/deluge/ui/console/commands/debug.py b/deluge/ui/console/commands/debug.py index 288f166f9..9b8a5efff 100644 --- a/deluge/ui/console/commands/debug.py +++ b/deluge/ui/console/commands/debug.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python # # debug.py # # Copyright (C) 2008-2009 Ido Abramovich +# Copyright (C) 2009 Andrew Resch # # Deluge is free software. # @@ -25,18 +25,18 @@ from deluge.ui.console.main import BaseCommand from deluge.ui.client import client import deluge.ui.console.colors as colors -import logging +import deluge.log class Command(BaseCommand): """Enable and disable debugging""" usage = 'debug [on|off]' def handle(self, state='', **options): if state == 'on': - logging.disable(logging.DEBUG) + deluge.log.setLoggerLevel("debug") elif state == 'off': - logging.disable(logging.ERROR) + deluge.log.setLoggerLevel("error") else: - print templates.ERROR(self.usage) + console.write("{!error!}%s" %s usage) - def complete(self, text, *args): - return [ x for x in ['on', 'off'] if x.startswith(text) ] +# def complete(self, text, *args): +# return [ x for x in ['on', 'off'] if x.startswith(text) ] diff --git a/deluge/ui/console/commands/quit.py b/deluge/ui/console/commands/quit.py index 6cdd5c603..b11bbdd0b 100644 --- a/deluge/ui/console/commands/quit.py +++ b/deluge/ui/console/commands/quit.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python # # quit.py # # Copyright (C) 2008-2009 Ido Abramovich +# Coptright (C) 2009 Andrew Resch # # Deluge is free software. #