X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fengine.py;h=d8409ea06b4c1b0afae15bbf67a6d88bdaccf27f;hp=2bf61692a808960c46a75916470c21e2c41266fd;hb=refs%2Fchanges%2F26%2F7626%2F1;hpb=c5b30ccbda826045bc23fe261e73333c0e735890 diff --git a/osm_nbi/engine.py b/osm_nbi/engine.py index 2bf6169..d8409ea 100644 --- a/osm_nbi/engine.py +++ b/osm_nbi/engine.py @@ -128,17 +128,17 @@ class Engine(object): if path.isfile(config_file): resources_to_operations_file = config_file break - if not resources_to_operations_file: + if not resources_to_operations_file: raise EngineException("Invalid permission configuration: resources_to_operations file missing") - + with open(resources_to_operations_file, 'r') as f: resources_to_operations = yaml.load(f) - + self.operations = [] for _, value in resources_to_operations["resources_to_operations"].items(): if value not in self.operations: - self.operations += value + self.operations += [value] if config["authentication"]["backend"] == "keystone": self.map_from_topic_to_class["users"] = UserTopicAuth