X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_nbi%2Fengine.py;h=9b17402ee7d84858d07f1ec8e6f0329336d6c803;hb=4606e4a16206757655e95deeed44457f821f9e4e;hp=37f1fb27503281a06db3117c95c91b8bcc3fc9c1;hpb=f100459221b95cdaaa543793623e556a9abd4852;p=osm%2FNBI.git diff --git a/osm_nbi/engine.py b/osm_nbi/engine.py index 37f1fb2..9b17402 100644 --- a/osm_nbi/engine.py +++ b/osm_nbi/engine.py @@ -205,7 +205,7 @@ class Engine(object): # "resources_to_operations file missing") # # with open(resources_to_operations_file, 'r') as f: - # resources_to_operations = yaml.load(f, Loader=yaml.Loader) + # resources_to_operations = yaml.safeload(f) # # self.operations = [] # @@ -293,7 +293,9 @@ class Engine(object): :return: The list, it can be empty if no one match the filter_q. """ if topic not in self.map_topic: - raise EngineException("Unknown topic {}!!!".format(topic), HTTPStatus.INTERNAL_SERVER_ERROR) + raise EngineException( + "Unknown topic {}!!!".format(topic), HTTPStatus.INTERNAL_SERVER_ERROR + ) return self.map_topic[topic].list(session, filter_q, api_req) def get_item(self, session, topic, _id, filter_q=None, api_req=False): @@ -307,7 +309,9 @@ class Engine(object): :return: dictionary, raise exception if not found. """ if topic not in self.map_topic: - raise EngineException("Unknown topic {}!!!".format(topic), HTTPStatus.INTERNAL_SERVER_ERROR) + raise EngineException( + "Unknown topic {}!!!".format(topic), HTTPStatus.INTERNAL_SERVER_ERROR + ) return self.map_topic[topic].show(session, _id, filter_q, api_req) def get_file(self, session, topic, _id, path=None, accept_header=None):