def install_marionette(device, version): if _adbflag: logger.debug('The marionette should be installed manually by user.') return True try: logger.info("Installing marionette extension") try: marionette_install(version) global remove_marionette_after_run remove_marionette_after_run = True except AlreadyInstalledException: logger.info("Marionette is already installed") except subprocess.CalledProcessError: logger.critical("Error installing marionette extension:\n%s" % traceback.format_exc()) raise except subprocess.CalledProcessError as e: logger.critical('Error installing marionette extension: %s' % e) logger.critical(traceback.format_exc()) return False except adb_b2g.WaitTimeout: logger.critical("Timed out waiting for device to become ready") return False device.restart() return True
def install_marionette(device, version): if _adbflag: logger.debug('The marionette should be installed manually by user.') return True try: logger.info("Installing marionette extension") try: marionette_install(version) global remove_marionette_after_run remove_marionette_after_run = True except AlreadyInstalledException: logger.info("Marionette is already installed") except subprocess.CalledProcessError: logger.critical( "Error installing marionette extension:\n%s" % traceback.format_exc()) raise except subprocess.CalledProcessError as e: logger.critical('Error installing marionette extension: %s' % e) logger.critical(traceback.format_exc()) return False except adb_b2g.WaitTimeout: logger.critical("Timed out waiting for device to become ready") return False device.restart() return True
def install_marionette(version): try: logger.info("Installing marionette extension") try: marionette_install(version) except AlreadyInstalledException: print "Marionette is already installed" except subprocess.CalledProcessError, e: logger.critical('Error installing marionette extension: %s' % e) sys.exit(1)
def install_marionette(version): try: logger.info("Installing marionette extension") try: marionette_install(version) except AlreadyInstalledException: logger.info("Marionette is already installed") except subprocess.CalledProcessError: logger.critical( "Error installing marionette extension:\n%s" % traceback.format_exc()) raise
def install_marionette(device, version): try: logger.info("Installing marionette extension") try: marionette_install(version) except AlreadyInstalledException: logger.info("Marionette is already installed") except subprocess.CalledProcessError: logger.critical( "Error installing marionette extension:\n%s" % traceback.format_exc()) raise except subprocess.CalledProcessError as e: logger.critical('Error installing marionette extension: %s' % e) logger.critical(traceback.format_exc()) return False except adb_b2g.WaitTimeout: logger.critical("Timed out waiting for device to become ready") return False device.restart() return True