From d05b828bd4e292ed7172a02d9377246dfc01faea Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Tue, 8 Jun 2010 22:44:12 +0200 Subject: [PATCH] remove the useless 'app_name' parameter from the Weboob class --- weboob/ouiboube.py | 3 +-- weboob/tools/application/base.py | 2 +- weboob/tools/application/prompt.py | 2 +- weboob/tools/application/qt.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/weboob/ouiboube.py b/weboob/ouiboube.py index d49afbae..8b012fe1 100644 --- a/weboob/ouiboube.py +++ b/weboob/ouiboube.py @@ -35,8 +35,7 @@ class Weboob(object): WORKDIR = os.path.join(os.path.expanduser('~'), '.weboob') BACKENDS_FILENAME = 'backends' - def __init__(self, app_name, workdir=WORKDIR, backends_filename=None, scheduler=None): - self.app_name = app_name + def __init__(self, workdir=WORKDIR, backends_filename=None, scheduler=None): self.workdir = workdir self.backends = {} diff --git a/weboob/tools/application/base.py b/weboob/tools/application/base.py index f6ba9f10..65a31f8c 100644 --- a/weboob/tools/application/base.py +++ b/weboob/tools/application/base.py @@ -60,7 +60,7 @@ class BaseApplication(object): self._parser.add_option('--shell-completion', action='store_true', help=optparse.SUPPRESS_HELP) def create_weboob(self): - return Weboob(self.APPNAME) + return Weboob() def create_storage(self, path=None, klass=None): """ diff --git a/weboob/tools/application/prompt.py b/weboob/tools/application/prompt.py index 5f707078..2bef01e5 100644 --- a/weboob/tools/application/prompt.py +++ b/weboob/tools/application/prompt.py @@ -52,7 +52,7 @@ class PromptApplication(ConsoleApplication): SYNOPSIS = 'Usage: %prog [options (-h for help)]' def create_weboob(self): - return Weboob(self.APPNAME, scheduler=PromptScheduler(self.prompt, self.read_cb)) + return Weboob(scheduler=PromptScheduler(self.prompt, self.read_cb)) @ConsoleApplication.command("Display this notice") def command_help(self): diff --git a/weboob/tools/application/qt.py b/weboob/tools/application/qt.py index f2773fae..2d6bca4d 100644 --- a/weboob/tools/application/qt.py +++ b/weboob/tools/application/qt.py @@ -67,7 +67,7 @@ class QtApplication(QApplication, BaseApplication): BaseApplication.__init__(self) def create_weboob(self): - return Weboob(self.APPNAME, scheduler=QtScheduler(self)) + return Weboob(scheduler=QtScheduler(self)) class QtMainWindow(QMainWindow): def __init__(self, parent=None):