M #~: add rescue in template import (#4868)

Signed-off-by: Carlos Herrera <cherrera@opennebula.io>
This commit is contained in:
Carlos J. Herrera authored and GitHub committed 2020-06-02 17:22:19 +02:00
1 parent 4f144b2943
commit 72de7de7ee
1 file changed
+1 -1
@@ -441,7 +441,7 @@ class Template
vswitch = []
vc_hosts = vc_pg.host
vc_hosts.each do |vc_host|
host_pgs = vc_host.configManager.networkSystem.networkInfo.portgroup
host_pgs = vc_host.configManager.networkSystem.networkInfo.portgroup rescue []
host_pgs.each do |pg|
if vc_pg.name == pg.spec.name
vswitch << pg.spec.vswitchName