Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 467491 - UnboundLocalError: local variable 'verr' referenced before assignment
Summary: UnboundLocalError: local variable 'verr' referenced before assignment
Keywords:
Status: CLOSED DUPLICATE of bug 467228
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Berrangé
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F10Target
TreeView+ depends on / blocked
 
Reported: 2008-10-17 18:42 UTC by James Laska
Modified: 2013-09-02 06:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-17 19:10:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description James Laska 2008-10-17 18:42:18 UTC
Description of problem:

traceback creating a KVM fully virtualized x86_64 guest with LVM logical volume as disk.  Looks to be a typo 'verr' vs 'ver'?

Version-Release number of selected component (if applicable):
virt-manager-0.6.0-2.fc10.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Launch virt-manager
2. Create a KVM x86_64 fully virtualized guest
3. Select Network tree installation method
4. Choose http://download.fedora.redhat.com/pub/fedora/linux/development/x86_64/os
5. Select a LVM logical volume as the backing store (/dev/linux/vguest1), select Next
  
Actual results:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 303, in forward
    if(self.validate(notebook.get_current_page()) != True):
  File "/usr/share/virt-manager/virtManager/create.py", line 1009, in validate
    conn=self._guest.conn)
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 135, in __init__
    self.__validate_params()
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 369, in __validate_params
    self.__check_if_path_managed()
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 348, in __check_if_path_managed
    "connection: %s" % (self.path, verr))
UnboundLocalError: local variable 'verr' referenced before assignment


Expected results:

No traceback


Additional info:

Comment 1 James Laska 2008-10-17 18:45:04 UTC
Perhaps just a variable not being initialized? 

The following fix addresses the issue:

--- /usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py	2008-10-17 14:44:29.000000000 -0400
+++ /tmp/fix.py	2008-10-17 14:44:25.000000000 -0400
@@ -303,6 +303,7 @@
     def __check_if_path_managed(self):
         vol = None
         err = None
+        verr = None
         pool = util.lookup_pool_by_path(self.conn,
                                         os.path.dirname(self.path))
         if pool:

Comment 2 Cole Robinson 2008-10-17 19:10:02 UTC

*** This bug has been marked as a duplicate of bug 467228 ***


Note You need to log in before you can comment on or make changes to this bug.