s/parseargs/parse_args

This commit is contained in:
Christophe Benz 2010-12-13 15:42:20 +01:00
commit 5bdd1540fe
9 changed files with 11 additions and 11 deletions

View file

@ -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:

View file

@ -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.'

View file

@ -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))

View file

@ -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

View file

@ -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:

View file

@ -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:

View file

@ -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)

View file

@ -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)

View file

@ -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),