From 6414d65d5d79f4847b24d6f417a48adbc9f22943 Mon Sep 17 00:00:00 2001 From: Bezleputh Date: Wed, 8 Oct 2014 09:07:49 +0200 Subject: [PATCH] [leboncoin] remove commented code --- modules/leboncoin/module.py | 39 +------------------------------------ 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/modules/leboncoin/module.py b/modules/leboncoin/module.py index 38ddabde..d04040dc 100644 --- a/modules/leboncoin/module.py +++ b/modules/leboncoin/module.py @@ -39,13 +39,7 @@ class LeboncoinModule(Module, CapHousing): CONFIG = BackendConfig(Value('advert_type', label='Advert type', choices={'c': 'Agency', 'p': 'Owner', 'a': 'All'}, default='a')) - """ - RET = {Query.HOUSE_TYPES.HOUSE: '1', - Query.HOUSE_TYPES.APART: '2', - Query.HOUSE_TYPES.LAND: '3', - Query.HOUSE_TYPES.PARKING: '4', - Query.HOUSE_TYPES.OTHER: '5'} - """ + def get_housing(self, _id): return self.browser.get_housing(_id) @@ -61,37 +55,6 @@ class LeboncoinModule(Module, CapHousing): return self.browser.get_cities(pattern) def search_housings(self, query): - """ - cities = [] - for c in query.cities: - cities.append('%s %s' % (c.id, c.name)) - - if len(cities) == 0: - return list() - - ret = [] - for g in query.house_types: - if g in self.RET: - ret.append(self.RET.get(g)) - - if len(ret) == 0: - return list() - - _type = 'ventes_immobilieres' - if query.type == Query.TYPE_RENT: - _type = 'locations' - - nb_rooms = '' if not query.nb_rooms else query.nb_rooms - area_min = '' if not query.area_min else query.area_min - area_max = '' if not query.area_max else query.area_max - cost_min = '' if not query.cost_min else query.cost_min - cost_max = '' if not query.cost_max else query.cost_max - - return self.browser.search_housings(_type, ','.join(cities), nb_rooms, - area_min, area_max, - cost_min, cost_max, '&ret='.join(ret), - self.config['advert_type'].get()) - """ return self.browser.search_housings(query, self.config['advert_type'].get()) OBJECTS = {Housing: fill_housing, HousingPhoto: fill_photo}