def get_ios_imei(UDID = ''):
''' Reads the device IMEI '''
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 = ''
for line in output:
if 'imei' in line.lower():
tmp = line
output = tmp[1].strip()
if len(output) != 14 and len(output) != 15:
CommonUtil.ExecLog(sModuleInfo, "Could not read the IMEI from the device", 3)
return 'failed'
CommonUtil.ExecLog(sModuleInfo, "%s" % output, 0)
return output
except Exception:
return CommonUtil.Exception_Handler(sys.exc_info())
iosOptions.py 文件源码
python
阅读 31
收藏 0
点赞 0
评论 0
评论列表
文章目录