mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 736112 - add try/except blocks around all harnesses devicemanager initialization so we always return an error code. r=wlach
This commit is contained in:
parent
bd5f2d8dcf
commit
883f765d75
@ -390,13 +390,18 @@ def main():
|
|||||||
print "Error: you must provide a device IP to connect to via the --device option"
|
print "Error: you must provide a device IP to connect to via the --device option"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if (options.dm_trans == "adb"):
|
try:
|
||||||
if (options.deviceIP):
|
if (options.dm_trans == "adb"):
|
||||||
dm = devicemanagerADB.DeviceManagerADB(options.deviceIP, options.devicePort)
|
if (options.deviceIP):
|
||||||
|
dm = devicemanagerADB.DeviceManagerADB(options.deviceIP, options.devicePort)
|
||||||
|
else:
|
||||||
|
dm = devicemanagerADB.DeviceManagerADB(None, None)
|
||||||
else:
|
else:
|
||||||
dm = devicemanagerADB.DeviceManagerADB(None, None)
|
dm = devicemanagerSUT.DeviceManagerSUT(options.deviceIP, options.devicePort)
|
||||||
else:
|
except devicemanager.DMError:
|
||||||
dm = devicemanagerSUT.DeviceManagerSUT(options.deviceIP, options.devicePort)
|
print "Error: exception while initializing devicemanager. Most likely the device is not in a testable state."
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
automation.setDeviceManager(dm)
|
automation.setDeviceManager(dm)
|
||||||
|
|
||||||
if (options.remoteProductName != None):
|
if (options.remoteProductName != None):
|
||||||
|
Loading…
Reference in New Issue
Block a user