1
0
mirror of https://github.com/thingsboard/thingsboard-gateway synced 2025-10-26 22:31:42 +08:00

Merge branch 'master' of https://github.com/thingsboard/thingsboard-gateway into feature/grpc-api

This commit is contained in:
zbeacon
2021-12-06 14:12:28 +02:00

View File

@@ -24,6 +24,7 @@ from threading import RLock, Thread
from time import sleep, time
from simplejson import JSONDecodeError, dumps, load, loads
from thingsboard_gateway.gateway.constants import CONNECTED_DEVICES_FILENAME
from yaml import safe_load
from thingsboard_gateway.gateway.constant_enums import DeviceActions
@@ -898,7 +899,7 @@ class TBGatewayService:
for device_name in devices:
try:
if not isinstance(devices[device_name], tuple):
open(self._config_dir + self.__connected_devices_file, 'w').close()
open(self._config_dir + CONNECTED_DEVICES_FILENAME, 'w').close()
log.debug("Old connected_devices file, new file will be created")
return
if self.available_connectors.get(devices[device_name][0]):