Skip to content

Commit 473b680

Browse files
Renusree-ctgoyalsaurabh06
authored andcommitted
DeviceConfig.py : Update phantom flag as string in interop tab data for API version compatibility.
- Updated checks for 'phantom' field to compare against true/True strings. - Ensures code works correctly with both older and newer API versions of the interop tab. Signed-off-by: Renusree-ct <renusree.rayavarapu@candelatech.com>
1 parent 1097492 commit 473b680

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

py-scripts/DeviceConfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def get_devices(self):
327327

328328
name = interop_tab_data['name']
329329

330-
if (interop_tab_data['phantom']):
330+
if (str(interop_tab_data['phantom']) == "true" or str(interop_tab_data['phantom']) == "True"):
331331
logger.warning(
332332
'{} is in phantom state. Please make sure debugging is enabled in developer settings.'.format(name))
333333

@@ -354,7 +354,7 @@ def get_devices(self):
354354
for device_data in interop_tab_data:
355355
device = {}
356356
for name, data in device_data.items():
357-
if (data['phantom']):
357+
if (str(data['phantom']) == "true" or str(data['phantom']) == "True"):
358358
logger.warning(
359359
'{} is in phantom state. Please make sure debugging is enabled in developer settings.'.format(
360360
name))

0 commit comments

Comments
 (0)