Fix 'debug' command and update some copyright headers

This commit is contained in:
Andrew Resch 2009-04-25 22:42:46 +00:00
parent 641ac7356c
commit 322495cfd5
4 changed files with 10 additions and 9 deletions

View File

@ -1,8 +1,8 @@
#!/usr/bin/env python
#
# config.py
#
# Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com>
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#

View File

@ -2,6 +2,7 @@
# connect.py
#
# Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com>
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#

View File

@ -1,8 +1,8 @@
#!/usr/bin/env python
#
# debug.py
#
# Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com>
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# 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) ]

View File

@ -1,8 +1,8 @@
#!/usr/bin/env python
#
# quit.py
#
# Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com>
# Coptright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#