From a63cb3b235d3bb60c91aa73c223379af8f9e6d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=85=B4=E7=9B=9B?= Date: Mon, 19 Sep 2016 16:43:50 +0800 Subject: [PATCH] ignore adb environment error --- atxweb/server.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/atxweb/server.py b/atxweb/server.py index 864527d..594d3fc 100644 --- a/atxweb/server.py +++ b/atxweb/server.py @@ -289,8 +289,12 @@ class DeviceHandler(tornado.web.RequestHandler): def get(self): '''get device list''' global device - d = AdbClient().devices().keys() - print 'android device list:', d + try: + d = AdbClient().devices().keys() + print 'android device list:', d + except EnvironmentError as e: + print 'ERROR:', str(e) + d = [] self.write({'android':d, 'ios':[], 'serial':device and device.serial}) def post(self):