Skip to content

Commit

Permalink
Switch to demjson3 requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
nielstron committed Sep 8, 2021
1 parent 918c00c commit 009f0d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pysyncthru/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Any, Dict, Optional, cast

import aiohttp
import demjson
import demjson3

from .htmlparsers import ENDPOINT_HTML_PARSERS

Expand Down Expand Up @@ -79,15 +79,15 @@ async def _current_data(self) -> Dict[str, Any]:

try:
async with self._session.get(url) as response:
res = demjson.decode(
res = demjson3.decode(
await response.text(), strict=False
) # type: Dict[str, Any]
# if we get something back from this endpoint,
# we directly return it
return res
except (aiohttp.ClientError, asyncio.TimeoutError):
pass
except demjson.JSONDecodeError:
except demjson3.JSONDecodeError:
# If no JSON data is provided but we want to only connect
# in this mode, raise an Exception
if self.connection_mode != ConnectionMode.AUTO:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

setup(
name="PySyncThru",
version="0.7.9",
version="0.7.10",
description=short_description,
author="nielstron",
author_email="n.muendler@web.de",
Expand All @@ -28,7 +28,7 @@
],
},
install_requires=[
"demjson",
"demjson3",
"aiohttp",
],
long_description=long_description,
Expand Down

0 comments on commit 009f0d2

Please sign in to comment.