Skip to content

Commit dabc5e7

Browse files
committed
Set default args value to an object to prevent a crash on Android.
1 parent 3593b3d commit dabc5e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

myDevices/devices/manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def addDeviceJSON(json):
8888
if 'args' in json:
8989
args = json["args"]
9090
else:
91-
args = []
91+
args = {}
9292

9393
if 'description' in json:
9494
description = json["description"]
@@ -145,12 +145,12 @@ def addDevice(name, device, description, args, origin):
145145

146146
instance = None
147147
try:
148-
148+
logger.info('addDevice: {}'.format(args))
149149
if len(args) > 0:
150150
instance = constructor(**args)
151151
else:
152152
instance = constructor()
153-
logger.debug('Adding instance ' + str(instance))
153+
logger.info('Adding instance ' + str(instance))
154154
addDeviceInstance(name, device, description, instance, args, origin)
155155
return 1
156156
except Exception as e:

0 commit comments

Comments
 (0)