Bug 467491 - UnboundLocalError: local variable 'verr' referenced before assignment
UnboundLocalError: local variable 'verr' referenced before assignment
Status: CLOSED DUPLICATE of bug 467228
Product: Fedora
Classification: Fedora
Component: virt-manager (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Berrange
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F10Target
  Show dependency treegraph
 
Reported: 2008-10-17 14:42 EDT by James Laska
Modified: 2013-09-02 02:28 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-17 15:10:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Laska 2008-10-17 14:42:18 EDT
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 14:45:04 EDT
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 15:10:02 EDT

*** 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.