def _find_robot_installation(self):
     output = utils.run_python_command(
         ['import robot; print robot.__file__ + ", " + robot.__version__'])
     robot_found = 'ImportError' not in output
     if robot_found:
         rf_file, rf_version = output.strip().split(', ')
         publish.RideLogMessage(
             "Found Robot Framework version {0} from '{1}'.".format(
                 rf_version, os.path.dirname(rf_file))).publish()
         return rf_version
     else:
         publish.RideLogMessage(publish.get_html_message('no_robot'),
                                notify_user=True).publish()
Пример #2
0
 def _find_robot_installation(self):
     output = utils.run_python_command([
         'import robot; print(robot.__file__ + \", \" + robot.__version__)'
     ])
     robot_found = b"ModuleNotFoundError" not in output and output
     if robot_found:
         rf_file, rf_version = output.strip().split(b", ")
         publish.RideLogMessage(
             "Found Robot Framework version %s from %s." %
             (str(rf_version, 'utf-8'),
              str(os.path.dirname(rf_file), 'utf-8'))).publish()
         return rf_version
     else:
         publish.RideLogMessage(publish.get_html_message('no_robot'),
                                notify_user=True).publish()
 def _publish_system_info(self):
     publish.RideLogMessage(context.SYSTEM_INFO).publish()