From 87edfa0955de931e978f8a4ea87fd30493a67216 Mon Sep 17 00:00:00 2001 From: niklascp Date: Tue, 9 Mar 2021 17:33:01 +0100 Subject: [PATCH] Fixing small bug when fuelEconomy is missing from response. --- .gitignore | 1 + connectedcars/models.py | 2 +- setup.py | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c86d35d..e235294 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ __pycache__/ env/ +.env/ build/ dist/ *.egg-info/ diff --git a/connectedcars/models.py b/connectedcars/models.py index 7a212fc..991b5e3 100644 --- a/connectedcars/models.py +++ b/connectedcars/models.py @@ -69,7 +69,7 @@ def create_from_dict(cls, dict): vehicle.make = str(dict['make']) vehicle.model = str(dict['model']) vehicle.name = str(dict['name']) - vehicle.fuelEconomy = float(dict['fuelEconomy']) + vehicle.fuelEconomy = float(dict['fuelEconomy']) if dict['fuelEconomy'] is not None else None if dict['position'] is not None: vehicle.position = VehiclePosition.create_from_dict(dict['position']) diff --git a/setup.py b/setup.py index f76c634..6fffb2d 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name = 'connectedcars', packages = ['connectedcars'], - version = '0.1.3', + version = '0.1.5', license = 'MIT', description = 'Wrapper for access the Connected Cars API - an AVL/data collection service installed in most new danish vehicles from Audi, Volkswagen, Skoda and SEAT.', long_description = long_description, @@ -18,12 +18,13 @@ author = 'Niklas Christoffer Petersen', author_email = 'nikalscp@gmail.com', url = 'https://github.com/niklascp/connectedcars-python', - download_url = 'https://github.com/niklascp/connectedcars-python/archive/v0.1.0.tar.gz', + download_url = 'https://github.com/niklascp/connectedcars-python/archive/v0.1.4.tar.gz', keywords = ['AVL', 'Audi', 'Volkswagen', 'Skoda', 'SEAT'], install_requires = install_requires, classifiers = [ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ], )