def get_ios_version(UDID = ''):
''' Reads the device version '''
sModuleInfo = inspect.stack()[0][3] + " : " + inspect.getmoduleinfo(__file__).name
CommonUtil.ExecLog(sModuleInfo, "Started", 0)
try:
output = get_device_info(UDID) # Get device info in list format
tmp = ''
version = ''
for line in output:
if 'productversion' in line.lower():
tmp = line
if ( tmp != ''):
tmp = tmp.split(":")
version = tmp[1].strip()
if version == '':
CommonUtil.ExecLog(sModuleInfo, "Could not read the iOS version from the device", 3)
return 'failed'
CommonUtil.ExecLog(sModuleInfo, "%s" % version, 0)
return version
except Exception:
return CommonUtil.Exception_Handler(sys.exc_info())
iosOptions.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录