Skip to content

Commit 5fd73d8

Browse files
jjlawrennkgilley
authored andcommitted
Use simplejson if available, similar to requests
1 parent e1cac05 commit 5fd73d8

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Diff for: pyecobee/__init__.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
""" Python Code for Communication with the Ecobee Thermostat """
2-
import json
32
from typing import Optional
43

54
import requests
65
from requests.exceptions import HTTPError, RequestException
76

7+
try:
8+
import simplejson as json
9+
except ImportError:
10+
import json
11+
812
from .const import (
913
_LOGGER,
1014
ECOBEE_ACCESS_TOKEN,

Diff for: pyecobee/util.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
"""Utility functions for the python-ecobee-api library."""
2-
import json
32
import os
43
from typing import Optional
54

5+
try:
6+
import simplejson as json
7+
except ImportError:
8+
import json
9+
610
from .const import _LOGGER
711

812

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"""
3434

3535
setup(name='python-ecobee-api',
36-
version='0.2.2',
36+
version='0.2.3',
3737
description='Python API for talking to Ecobee thermostats',
3838
url='https://github.com/nkgilley/python-ecobee-api',
3939
author='Nolan Gilley',

0 commit comments

Comments
 (0)