Skip to content

Commit

Permalink
Updated libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
imbeacon committed Apr 1, 2024
1 parent 1126cbd commit d1cff07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
setuptools
packaging==23.1
jsonpath-rw
regex
Expand All @@ -9,7 +10,7 @@ requests>=2.31.0
questionary
pyfiglet
termcolor
grpcio==1.58.0
grpcio
mmh3
protobuf<=3.20.0
cachetools
Expand Down
10 changes: 5 additions & 5 deletions thingsboard_gateway/tb_utility/tb_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from time import sleep, time
from uuid import uuid1

from pkg_resources import DistributionNotFound
from pkg_resources import get_distribution
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version
from requests import ConnectionError, post
from simplejson import loads

Expand All @@ -35,9 +35,9 @@ def __init__(self):
super().__init__()

try:
self.__version = {"current_version": get_distribution('thingsboard_gateway').version,
"latest_version": get_distribution('thingsboard_gateway').version}
except DistributionNotFound:
self.__version = {"current_version": version('thingsboard_gateway'),
"latest_version": version('thingsboard_gateway')}
except PackageNotFoundError:
self.__version = {"current_version": "0.0", "latest_version": "0.0"}

self.__instance_id = str(uuid1())
Expand Down

0 comments on commit d1cff07

Please sign in to comment.