File use-before-define.patch of Package open-ovf

Index: open-ovf-0.1/py/ovf/OvfLibvirt.py
===================================================================
--- open-ovf-0.1.orig/py/ovf/OvfLibvirt.py
+++ open-ovf-0.1/py/ovf/OvfLibvirt.py
@@ -1073,10 +1073,10 @@ def getOvfDisks(virtualHardware, dir, re
         source = None
         hostResource = ovfDisk['rasd:HostResource']
         resourceId = hostResource.rsplit('/', 1).pop()
+        hostResources = []
         if hostResource.startswith('ovf://disk/'):
             diskList = Ovf.getDict(diskSection)['children']
 
-            hostResources = []
             for child in diskList:
                 #Create a tuple (file hostResource, diskId, referred?)
                 #flag to check if the disk is referred
@@ -1209,7 +1209,7 @@ def getOvfNetworks(virtualHardware, conf
     # also assume that the network currently exists.  The default network
     # is "default".
     for netDevice in ovfNetDeviceList:
-        netAttach = 'default'
+        netConnect = 'default'
         if netDevice.has_key('rasd:Connection'):
             netConnect = netDevice['rasd:Connection']
         netList.append(dict(interfaceType = 'network', sourceName = netConnect))
openSUSE Build Service is sponsored by