Bug 495864 - DVD eject raises NameError: global name 'device' is not defined
Summary: DVD eject raises NameError: global name 'device' is not defined
Keywords:
Status: CLOSED DUPLICATE of bug 492459
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-15 08:48 UTC by b.candler
Modified: 2009-04-15 13:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-15 13:55:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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


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