From 15bf492fca482ba1fd08b75ece11647bbb0e844b Mon Sep 17 00:00:00 2001 From: Bezleputh Date: Thu, 25 Sep 2014 00:08:56 +0200 Subject: [PATCH] [flatboob] ask for query.type in flatboob --- weboob/applications/flatboob/flatboob.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/weboob/applications/flatboob/flatboob.py b/weboob/applications/flatboob/flatboob.py index c9bf567468..609c8bd366 100644 --- a/weboob/applications/flatboob/flatboob.py +++ b/weboob/applications/flatboob/flatboob.py @@ -155,6 +155,19 @@ def do_search(self, line): else: query.type_of_good.append(value) + _type = None + while _type not in [query.TYPE_RENT, query.TYPE_SALE]: + print ' %s%2d)%s %s' % (self.BOLD, + query.TYPE_RENT, + self.NC, + "Rent") + print ' %s%2d)%s %s' % (self.BOLD, + query.TYPE_SALE, + self.NC, + "Sale") + _type = self.ask_int('Type of query') + + query.type = _type query.area_min = self.ask_int('Enter min area') query.area_max = self.ask_int('Enter max area') query.cost_min = self.ask_int('Enter min cost') -- GitLab