Bug 740681

Summary: AttributeError: 'module' object has no attribute 'readlink'
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: anacondaAssignee: David Lehman <dlehman>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: anaconda-maint-list, jonathan, jsmith.fedora, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:9c834c42faba21995dc77538a8e82f9c3b8b4856843b5a14c6529ec9110ea3b5
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-23 14:39:45 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
File: anaconda-tb-w4B92P none

Description Adam Williamson 2011-09-22 18:29:42 EDT
abrt version: 2.0.5
executable:     /usr/bin/python
hashmarkername: anaconda
kernel:         3.1.0-0.rc6.git0.0.fc16.x86_64
product:        Fedora
reason:         AttributeError: 'module' object has no attribute 'readlink'
time:           Thu Sep 22 18:28:43 2011
version:        16

anaconda-tb-w4B92P: Text file, 365220 bytes

description:
:The following was filed automatically by anaconda:
:anaconda 16.18 exception report
:Traceback (most recent call first):
:  File "/tmp/updates/pyanaconda/storage/devicetree.py", line 1031, in get_live_backing_device_path
:    root_path = os.path.readlink(dev_live)
:  File "/tmp/updates/pyanaconda/storage/devicetree.py", line 1058, in addUdevDevice
:    live_path = get_live_backing_device_path()
:  File "/tmp/updates/pyanaconda/storage/devicetree.py", line 1881, in _populate
:    self.addUdevDevice(dev)
:  File "/tmp/updates/pyanaconda/storage/devicetree.py", line 1838, in populate
:    self._populate(progressWindow)
:  File "/tmp/updates/pyanaconda/storage/__init__.py", line 475, in reset
:    cleanupOnly=cleanupOnly)
:  File "/tmp/updates/pyanaconda/storage/__init__.py", line 104, in storageInitialize
:    storage.reset()
:  File "/tmp/updates/pyanaconda/dispatch.py", line 373, in dispatch
:    self.dir = self.steps[self.step].target(self.anaconda)
:  File "/tmp/updates/pyanaconda/dispatch.py", line 241, in go_forward
:    self.dispatch()
:  File "/tmp/updates/pyanaconda/gui.py", line 1203, in nextClicked
:    self.anaconda.dispatch.go_forward()
:AttributeError: 'module' object has no attribute 'readlink'
Comment 1 Adam Williamson 2011-09-22 18:29:46 EDT
Created attachment 524506 [details]
File: anaconda-tb-w4B92P
Comment 2 Adam Williamson 2011-09-22 18:31:12 EDT
Hit this while testing a live install with a random USB stick attached to the machine. Test machine was KVM VM, with a host USB stick attached. Hit this while using http://dlehman.fedorapeople.org/updates-738964.4.img to see if it fixes #738964 in the case where there's a random unused USB stick plugged into the machine during install.
Comment 3 Martin Gracik 2011-09-23 06:59:14 EDT
root_path = os.path.readlink(dev_live)

should be os.readlink()

This is not yet commited in the repo, so I think it's just in the updates.img
Comment 4 David Lehman 2011-09-23 12:03:39 EDT
New image that should fix this:

  http://dlehman.fedorapeople.org/updates-738964.5.img
Comment 5 Jared Smith 2011-09-23 12:15:50 EDT
I get the following syntax error with the .5.img image:

[root@cheapseats tmp]# liveinst updates=http://dlehman.fedorapeople.org/updates-738964.5.img
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  130k  100  130k    0     0  65646      0  0:00:02  0:00:02 --:--:-- 78408
1193 blocks
localuser:root being added to access control list
Traceback (most recent call last):
  File "/usr/sbin/anaconda", line 582, in <module>
    from pyanaconda import kickstart
  File "/tmp/updates/pyanaconda/kickstart.py", line 21, in <module>
    from storage.deviceaction import *
  File "/tmp/updates/pyanaconda/storage/__init__.py", line 42, in <module>
    from devicetree import DeviceTree
  File "/tmp/updates/pyanaconda/storage/devicetree.py", line 1041
    root_path = os.path.realpath(value.split(":", 1)[1]))
                                                        ^
SyntaxError: invalid syntax
Comment 6 Adam Williamson 2011-09-23 14:39:45 EDT
closing as this ought to be fixed in -6.