Bug 495864

Summary: DVD eject raises NameError: global name 'device' is not defined
Product: [Fedora] Fedora Reporter: b.candler
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: anaconda-maint-list, pjones, rmaximo, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-15 13:55:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description b.candler 2009-04-15 08:48:01 UTC
Description of problem:

Installing Fedora Beta 11 DVD onto a Thinkpad X30, it got as far as installing all the packages and then gave an unhandled exception error at the point of finally ejecting the DVD. It appears to be a bug in the python code when logging a warning on I/O error - it raises a NameError on 'device'

The following report is hand-transcribed:

--- 8< ---------------------------------------------------------------
    Exception Occurred

An unhandled exception has occurred. This is most likely a bug. Please save
a copy of the detailed exception and file a bug report against anaconda at
https://bugzilla.redhat.com

Details
anaconda 11.5.0.38 exception report
Traceback (most recent call first):
  File "/usr/lib/anaconda/storage/devices.py", line 2687, in eject
    log.warning("error ejecting cdrom %s: %s" % (device, e))
  File "/usr/lib/anaconda/installmethod.py", line 47, in doMethodComplete
    dev.eject()
  File "/usr/lib/anaconda/dispatch.py", line 205, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 128, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/gui.py", line 1317, in nextClicked
    self.anaconda.dispatch.gotoNext()
  File "/usr/lib/anaconda/iw/progress_gui,py", line 79, in renderCallback
    self.intf.icw.nextClicked()
  File "/usr/lib/anaconda/gui.py", line 1338, in handleRenderCallback
    self.currentWindow.renderCallback()
NameError: global name 'device' is not defined

Local variables in innermost frame:
fd: 182
_isys: <module '_isys' from '/usr/lib/anaconda/_isys.so'>
e: (5, 'Input/output error')
self: OpticalDevice instance (0xb70732ac) --
  description =   name = sr0   status = True  parents = []
  kids = 0
  uuid = None  format = <storage.formats.fs.Iso9660FS object at 0xb70779e
  major = 11  minor = 0  exists = True
  sysfs path = /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:2.0/host2/targ
  target size = 0  path = /dev/sr0
  format args = []

... snip rest ...
--- 8< ---------------------------------------------------------------


Version-Release number of selected component (if applicable):
anaconda 11.5.0.38 from Fedora 11 Beta DVD

How reproducible:
Depends on whether your CD-ROM drive fails to eject :-)

Fix:
Perhaps 'device' should be 'self.name' ? (untested)

Comment 1 Chris Lumens 2009-04-15 13:55:45 UTC

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