smartcar / python-sdk

Smartcar Python SDK
MIT License
45 stars 14 forks source link

Use unit system from response header. #36

Closed sankethkatta closed 6 years ago

sankethkatta commented 6 years ago

The main change is this in vehicle.py:

-            'unit_system': self.api.unit,
+            'unit_system': response.headers['sc-unit-system'],

The header was previously being pulled from the self not the response header.