mirror of
https://github.com/thingsboard/thingsboard-gateway
synced 2025-10-26 22:31:42 +08:00
Merge branch 'develop/2.4-python' of https://github.com/thingsboard/thingsboard-gateway into feature/http-connector
This commit is contained in:
@@ -67,10 +67,11 @@ class TBUpdater(Thread):
|
|||||||
content = loads(response.content)
|
content = loads(response.content)
|
||||||
if content is not None and content.get("updateAvailable", False):
|
if content is not None and content.get("updateAvailable", False):
|
||||||
new_version = content["message"].replace("New version ", "").replace(" is available!", "")
|
new_version = content["message"].replace("New version ", "").replace(" is available!", "")
|
||||||
log.info(content["message"])
|
if new_version > self.__version["current_version"]:
|
||||||
self.__version["latest_version"] = new_version
|
log.info(content["message"])
|
||||||
log.info("\n\n[===UPDATE===]\n\n New version %s is available! \n\n[===UPDATE===]\n",
|
self.__version["latest_version"] = new_version
|
||||||
self.__version["latest_version"])
|
log.info("\n\n[===UPDATE===]\n\n New version %s is available! \n\n[===UPDATE===]\n",
|
||||||
|
self.__version["latest_version"])
|
||||||
except ConnectionRefusedError:
|
except ConnectionRefusedError:
|
||||||
log.warning("Cannot connect to the update service. PLease check your internet connection.")
|
log.warning("Cannot connect to the update service. PLease check your internet connection.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user