From 83f378405780264018d855bb6ace358d25c46d9f Mon Sep 17 00:00:00 2001 From: kovacsbalu Date: Mon, 21 Oct 2019 16:50:02 +0200 Subject: [PATCH] Minor cleanup --- WazeRouteCalculator/WazeRouteCalculator.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/WazeRouteCalculator/WazeRouteCalculator.py b/WazeRouteCalculator/WazeRouteCalculator.py index 5d98684..f75b198 100644 --- a/WazeRouteCalculator/WazeRouteCalculator.py +++ b/WazeRouteCalculator/WazeRouteCalculator.py @@ -49,33 +49,24 @@ def __init__(self, start_address, end_address, region='EU', vehicle_type='', avo if log_lvl: self.log.warning("log_lvl is deprecated please check example.py ") self.log.info("From: %s - to: %s", start_address, end_address) - region = region.upper() if region == 'NA': # North America region = 'US' self.region = region - self.vehicle_type = '' if vehicle_type and vehicle_type in self.VEHICLE_TYPES: self.vehicle_type = vehicle_type.upper() - - self.avoid_subscription_roads = '' - if not avoid_subscription_roads: - self.avoid_subscription_roads = avoid_subscription_roads - self.route_options = ['AVOID_TRAILS'] if avoid_toll_roads: self.route_options.append('AVOID_TOLL_ROADS') - + self.avoid_subscription_roads = avoid_subscription_roads if avoid_ferries: self.route_options.append('AVOID_FERRIES') - if self.already_coords(start_address): # See if we have coordinates or address to resolve self.start_coords = self.coords_string_parser(start_address) else: self.start_coords = self.address_to_coords(start_address) self.log.debug('Start coords: (%s, %s)', self.start_coords["lat"], self.start_coords["lon"]) - if self.already_coords(end_address): # See if we have coordinates or address to resolve self.end_coords = self.coords_string_parser(end_address) else: