Index: test/lldbtest.py =================================================================== --- test/lldbtest.py +++ test/lldbtest.py @@ -47,11 +47,6 @@ import lldbutil from _pyio import __metaclass__ -if sys.version_info.major < 3: - import urlparse -else: - import urllib.parse as urlparse - # dosep.py starts lots and lots of dotest instances # This option helps you find if two (or more) dotest instances are using the same # directory at the same time @@ -445,17 +440,17 @@ def android_device_api(): device_id = None - if lldb.platform_url: - parsed = urlparse.urlparse(lldb.platform_url) - if parsed.scheme == "adb": - device_id = parsed.hostname + if lldb.platform_url and lldb.platform_url[:6] == "adb://": + device_id = lldb.platform_url.split(":")[1][2:] retcode, stdout, stderr = run_adb_command( ["shell", "getprop", "ro.build.version.sdk"], device_id) if retcode == 0: return int(stdout) else: raise LookupError( - "Unable to determine the API level of the Android device.") + ">>> Unable to determine the API level of the Android device.\n" + ">>> stdout:\n%s\n" + ">>> stderr:\n%s\n" % (stdout, stderr)) # # Decorators for categorizing test cases.