flatboob: add command help and do not use limit for cities search
This commit is contained in:
parent
3bbf4c8a26
commit
8d29aa8a6d
1 changed files with 11 additions and 1 deletions
|
|
@ -93,6 +93,11 @@ class Flatboob(ReplApplication):
|
||||||
|
|
||||||
@defaultcount(10)
|
@defaultcount(10)
|
||||||
def do_search(self, line):
|
def do_search(self, line):
|
||||||
|
"""
|
||||||
|
search
|
||||||
|
|
||||||
|
Search for housing. Parameters are interactively asked.
|
||||||
|
"""
|
||||||
pattern = 'notempty'
|
pattern = 'notempty'
|
||||||
query = Query()
|
query = Query()
|
||||||
query.cities = []
|
query.cities = []
|
||||||
|
|
@ -104,7 +109,7 @@ class Flatboob(ReplApplication):
|
||||||
break
|
break
|
||||||
|
|
||||||
cities = []
|
cities = []
|
||||||
for backend, city in self.do('search_city', pattern):
|
for backend, city in self.weboob.do('search_city', pattern):
|
||||||
cities.append(city)
|
cities.append(city)
|
||||||
|
|
||||||
if len(cities) == 0:
|
if len(cities) == 0:
|
||||||
|
|
@ -156,6 +161,11 @@ class Flatboob(ReplApplication):
|
||||||
return self._complete_object()
|
return self._complete_object()
|
||||||
|
|
||||||
def do_info(self, _id):
|
def do_info(self, _id):
|
||||||
|
"""
|
||||||
|
info ID
|
||||||
|
|
||||||
|
Get information about a housing.
|
||||||
|
"""
|
||||||
if not _id:
|
if not _id:
|
||||||
print >>sys.stderr, 'This command takes an argument: %s' % self.get_command_help('info', short=True)
|
print >>sys.stderr, 'This command takes an argument: %s' % self.get_command_help('info', short=True)
|
||||||
return 2
|
return 2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue