summaryrefslogtreecommitdiffstats
path: root/image.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2008-03-20 16:51:12 -0400
committerJeremy Katz <katzj@redhat.com>2008-03-20 16:51:12 -0400
commit46de99a245db4778b70dd8c33972f918f39f3780 (patch)
treea06415a7aa5324f95fb6f76c0be739c2d78fa4a1 /image.py
parente1de255048cfed5dc120b6e7f77dfc65ebfaeaba (diff)
downloadanaconda-46de99a245db4778b70dd8c33972f918f39f3780.tar.gz
anaconda-46de99a245db4778b70dd8c33972f918f39f3780.tar.xz
anaconda-46de99a245db4778b70dd8c33972f918f39f3780.zip
Handle /dev being on hard drive devices in the second stage
Sometimes, we can have a device without the leading /dev (method= or stage2= for compatibility) and doing strrchr breaks on cciss too. So just pass whatever we got to the second stage and deal with it where we can at least use python string handling
Diffstat (limited to 'image.py')
-rw-r--r--image.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/image.py b/image.py
index c2daa3625..021a0e6f2 100644
--- a/image.py
+++ b/image.py
@@ -141,9 +141,12 @@ def mountDirectory(isodir, methodstr, messageWindow):
lines = f.readlines()
f.close()
+ if not device.startswith("/dev/"):
+ device = "/dev/%s" %(device,)
+
for l in lines:
s = string.split(l)
- if s[0] == "/dev/" + device:
+ if s[0] == device:
# It is, so there's no need to try again.
return