def get_deviceName(self): values = os.popen(self.get_device).readlines() dev = values[1].split()[0] if len(values) - 2 == 1: print dev log.info('手机设备为:' + dev) return dev else: log.warn('暂未获取到手机设备') print 'No device found'
def get_deviceName(self): values = os.popen(self.get_device).readlines() dev = values[1].split()[0] if len(values) - 2 == 1: print(dev) log.info("手机设备为:" + dev) return dev else: log.warn("暂未获取到手机设备") print("No device found")
def get_deviceName(self): values = os.popen(self.get_device).readlines() dev = values[1].split()[0] if len(values)-2 == 1: print dev log.info('手机设备为:'+dev) return dev else: log.warn('暂未获取到手机设备') print 'No device found'
def get_platformVersion(self): values = os.popen(self.get_Version).readlines() if values != '': Version = values[0].split('=')[1] print Version log.info('手机版本号为:' + Version) return Version.strip() else: log.warn('暂未获取到手机设备') print 'No device found'
def get_platformVersion(self): values = os.popen(self.get_Version).readlines() if values != "": Version = values[0].split("=")[1] print(Version) log.info("手机版本号为:" + Version) return Version.strip() else: log.warn("暂未获取到手机设备") print("No device found")
def get_platformVersion(self): values = os.popen(self.get_Version).readlines() if values != '': Version=values[0].split('=')[1] print Version log.info('手机版本号为:'+Version) return Version.strip() else: log.warn('暂未获取到手机设备') print 'No device found'