Przeglądaj źródła

Fix self._warn bug

In case the origin network name was not provided for the openstack
importer, it would call self._warn which would result in an error as there
is no _warn method defined. Now, instead of calling _warn we're making a
progress update so not only we avoid the error, but the user also gets to
know what's going on.
Nichita Herciu 9 lat temu
rodzic
commit
8b81035e98
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      coriolis/providers/openstack/imp.py

+ 3 - 2
coriolis/providers/openstack/imp.py

@@ -495,8 +495,9 @@ class ImportProvider(base.BaseImportProvider, base.BaseReplicaImportProvider):
         for nic_info in nics_info:
             origin_network_name = nic_info.get("network_name")
             if not origin_network_name:
-                self._warn("Origin network name not provided for for nic: "
-                           "%s, skipping", nic_info.get("name"))
+                self._event_manager.progress_update(
+                    "Origin network name not provided for nic: %s, skipping" % 
+                    nic_info.get("name"))
                 continue
 
             network_name = config.network_map.get(origin_network_name)