Static analysis fixes (#1154)
Fixed incorrect type checking logic flagged by flake8
This commit is contained in:
Родитель
014440103e
Коммит
5d343d5904
|
@ -252,7 +252,7 @@ class ServiceHelperSync(object):
|
|||
if device_id == self.device_id and module_id == self.module_id:
|
||||
|
||||
converted_event = self._convert_incoming_event(event)
|
||||
if type(converted_event) == EventhubEvent:
|
||||
if isinstance(converted_event, EventhubEvent):
|
||||
if "message-id" in converted_event.system_properties:
|
||||
logger.info(
|
||||
"Received event with msgid={}".format(
|
||||
|
|
|
@ -40,7 +40,7 @@ async def reboot_handler(values):
|
|||
global min_temp
|
||||
global avg_temp_list
|
||||
global target_temperature
|
||||
if values and type(values) == int:
|
||||
if isinstance(values, int):
|
||||
print("Rebooting after delay of {delay} secs".format(delay=values))
|
||||
asyncio.sleep(values)
|
||||
max_temp = None
|
||||
|
|
Загрузка…
Ссылка в новой задаче