fix other flake8 problem 02/8902/1
authortierno <alfonso.tiernosepulveda@telefonica.com>
Tue, 12 May 2020 14:32:37 +0000 (14:32 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Tue, 12 May 2020 14:32:37 +0000 (14:32 +0000)
Change-Id: I6a076fa05f734432f48e0ab9826e27bffe0b80ad
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
osm_nbi/nbi.py

index 64f071e..3a23a1a 100644 (file)
@@ -807,8 +807,9 @@ class Server(object):
                         return_text += "  {}: {}\n".format(k, v)
                 elif cherrypy.request.method == 'GET':
                     for k, v in kwargs.items():
-                        self.engine.msg.write(main_topic, k, yaml.load(v), Loader=yaml.SafeLoader)
-                        return_text += "  {}: {}\n".format(k, yaml.load(v), Loader=yaml.SafeLoader)
+                        v_dict = yaml.load(v, Loader=yaml.SafeLoader)
+                        self.engine.msg.write(main_topic, k, v_dict)
+                        return_text += "  {}: {}\n".format(k, v_dict)
             except Exception as e:
                 return_text += "Error: " + str(e)
             return_text += "</pre></html>\n"