From 5bdd1540fe32bc4d9d4f2e127943567ea8bc01ad Mon Sep 17 00:00:00 2001 From: Christophe Benz Date: Mon, 13 Dec 2010 15:42:20 +0100 Subject: [PATCH] s/parseargs/parse_args --- weboob/applications/boobank/boobank.py | 2 +- weboob/applications/boobmsg/boobmsg.py | 2 +- weboob/applications/chatoob/chatoob.py | 2 +- weboob/applications/havesex/havesex.py | 2 +- weboob/applications/traveloob/traveloob.py | 2 +- weboob/applications/weboobcfg/weboobcfg.py | 2 +- weboob/applications/weboorrents/weboorrents.py | 2 +- weboob/applications/wetboobs/wetboobs.py | 4 ++-- weboob/tools/application/repl.py | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/weboob/applications/boobank/boobank.py b/weboob/applications/boobank/boobank.py index f48570fb..1db00c53 100644 --- a/weboob/applications/boobank/boobank.py +++ b/weboob/applications/boobank/boobank.py @@ -196,7 +196,7 @@ class Boobank(ReplApplication): If you give only the ACCOUNT parameter, it lists all the available recipients for this account. """ - id_from, id_to, amount, reason = self.parseargs(line, 4, 1) + id_from, id_to, amount, reason = self.parse_args(line, 4, 1) id_from, backend_name_from = self.parse_id(id_from) if not id_to: diff --git a/weboob/applications/boobmsg/boobmsg.py b/weboob/applications/boobmsg/boobmsg.py index 7bccc5b0..d374e862 100644 --- a/weboob/applications/boobmsg/boobmsg.py +++ b/weboob/applications/boobmsg/boobmsg.py @@ -177,7 +177,7 @@ class Boobmsg(ReplApplication): If no text is supplied on command line, the content of message is read on stdin. """ - receivers, text = self.parseargs(line, 2, 1) + receivers, text = self.parse_args(line, 2, 1) if text is None: if self.interactive: print 'Reading message content from stdin... Type ctrl-D from an empty line to post message.' diff --git a/weboob/applications/chatoob/chatoob.py b/weboob/applications/chatoob/chatoob.py index ea1fa470..305951ba 100644 --- a/weboob/applications/chatoob/chatoob.py +++ b/weboob/applications/chatoob/chatoob.py @@ -62,7 +62,7 @@ class Chatoob(ReplApplication): Send a message to the specified contact. """ - _id, message = self.parseargs(line, 2, 2) + _id, message = self.parse_args(line, 2, 2) for backend, result in self.do('send_chat_message', _id, message): if not result: logging.error(u'Failed to send message to contact id="%s" on backend "%s"' % (_id, backend.name)) diff --git a/weboob/applications/havesex/havesex.py b/weboob/applications/havesex/havesex.py index 21bf68ca..d520149e 100644 --- a/weboob/applications/havesex/havesex.py +++ b/weboob/applications/havesex/havesex.py @@ -240,7 +240,7 @@ class HaveSex(ReplApplication): * edit configure an optimization service for a backend * stop stop optimization services on a backend """ - cmd, backend_name, optims_names = self.parseargs(line, 3) + cmd, backend_name, optims_names = self.parse_args(line, 3) if backend_name == '*': backend_name = None diff --git a/weboob/applications/traveloob/traveloob.py b/weboob/applications/traveloob/traveloob.py index f1f7cefd..2f553cc6 100644 --- a/weboob/applications/traveloob/traveloob.py +++ b/weboob/applications/traveloob/traveloob.py @@ -49,7 +49,7 @@ class Traveloob(ReplApplication): List all departures for a given station. """ - station, arrival = self.parseargs(line, 2, 1) + station, arrival = self.parse_args(line, 2, 1) station_id, backend_name = self.parse_id(station) if arrival: diff --git a/weboob/applications/weboobcfg/weboobcfg.py b/weboob/applications/weboobcfg/weboobcfg.py index 1756b449..e6548bd5 100644 --- a/weboob/applications/weboobcfg/weboobcfg.py +++ b/weboob/applications/weboobcfg/weboobcfg.py @@ -52,7 +52,7 @@ class WeboobCfg(ReplApplication): if not line: print >>sys.stderr, 'You must specify a backend name. Hint: use the "backends" command.' return - name, options = self.parseargs(line, 2, 1) + name, options = self.parse_args(line, 2, 1) if options: options = options.split(' ') else: diff --git a/weboob/applications/weboorrents/weboorrents.py b/weboob/applications/weboorrents/weboorrents.py index c796c168..f16ef644 100644 --- a/weboob/applications/weboorrents/weboorrents.py +++ b/weboob/applications/weboorrents/weboorrents.py @@ -144,7 +144,7 @@ class Weboorrents(ReplApplication): FILENAME is where to write the file. If FILENAME is '-', the file is written to stdout. """ - id, dest = self.parseargs(line, 2, 2) + id, dest = self.parse_args(line, 2, 2) _id, backend_name = self.parse_id(id) diff --git a/weboob/applications/wetboobs/wetboobs.py b/weboob/applications/wetboobs/wetboobs.py index 7f4838ec..9773b7a7 100644 --- a/weboob/applications/wetboobs/wetboobs.py +++ b/weboob/applications/wetboobs/wetboobs.py @@ -125,7 +125,7 @@ class WetBoobs(ReplApplication): Get current weather for specified city. Use the 'search' command to find its ID. """ - city, = self.parseargs(line, 1, 1) + city, = self.parse_args(line, 1, 1) _id, backend_name = self.parse_id(city) for backend, current in self.do('get_current', _id, backends=backend_name): if current: @@ -144,7 +144,7 @@ class WetBoobs(ReplApplication): Get forecasts for specified city. Use the 'search' command to find its ID. """ - city, = self.parseargs(line, 1, 1) + city, = self.parse_args(line, 1, 1) _id, backend_name = self.parse_id(city) for backend, forecast in self.do('iter_forecast', _id, backends=backend_name): self.format(forecast) diff --git a/weboob/tools/application/repl.py b/weboob/tools/application/repl.py index 0f0a41c2..edc9cf86 100644 --- a/weboob/tools/application/repl.py +++ b/weboob/tools/application/repl.py @@ -343,7 +343,7 @@ class ReplApplication(Cmd, BaseApplication): except BackendNotFound, e: logging.error(e) - def parseargs(self, line, nb, req_n=None): + def parse_args(self, line, nb, req_n=None): if line.strip() == '': # because ''.split() = [''] args = [] @@ -758,7 +758,7 @@ class ReplApplication(Cmd, BaseApplication): * quiet is an alias for error * default is an alias for warning """ - args = self.parseargs(line, 1, 0) + args = self.parse_args(line, 1, 0) levels = (('debug', logging.DEBUG), ('info', logging.INFO), ('warning', logging.WARNING),