From 821e940f25b743b01ed34d8e0b0dd91b54c766d5 Mon Sep 17 00:00:00 2001 From: Christopher Hrabia Date: Thu, 31 Aug 2017 14:07:58 +0200 Subject: [PATCH 1/2] fixed wrong import --- rostful/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rostful/__main__.py b/rostful/__main__.py index 007d74c..6703ce3 100644 --- a/rostful/__main__.py +++ b/rostful/__main__.py @@ -44,7 +44,7 @@ def pyros_start(config, ros_args='', pyros_ctx_impl=None): try: from pyros.server.ctx_server import pyros_ctx from pyros.client.client import PyrosClient - from pyros_interfaces_ros import PyrosROS + from pyros_interfaces_ros.pyros_ros import PyrosROS except Exception as e: logging.error("pyros module is not accessible in sys.path. It is required to run rostful.", exc_info=True) From 3f07a88fc580059321ac29c452df882dfc267fac Mon Sep 17 00:00:00 2001 From: Christopher Hrabia Date: Thu, 9 Nov 2017 11:03:41 +0100 Subject: [PATCH 2/2] fixed wrong local imports, made them global --- rostful/api_0_1/flask_views.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rostful/api_0_1/flask_views.py b/rostful/api_0_1/flask_views.py index eea87d5..04ccdec 100644 --- a/rostful/api_0_1/flask_views.py +++ b/rostful/api_0_1/flask_views.py @@ -66,6 +66,9 @@ def get_query_bool(query_string, param_name): from webargs.flaskparser import FlaskParser, use_kwargs +from pyros_interfaces_ros import definitions +from pyros.client.client import PyrosServiceTimeout, PyrosServiceNotFound + parser = FlaskParser() import urllib @@ -102,10 +105,6 @@ class BackEnd(restful.Resource): # TODO : unit test that stuff !!! http://flas def __init__(self): super(BackEnd, self).__init__() - # dynamic import - from pyros_interfaces_ros import definitions - from pyros.client.client import PyrosServiceTimeout, PyrosServiceNotFound - self.node_client = context.get_pyros_client() # we retrieve pyros client from app context # TODO: think about login rest service before disabling REST services if not logged in