diff options
author | Matt Wilson <msw@redhat.com> | 2001-06-25 05:50:45 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-06-25 05:50:45 +0000 |
commit | 0d308d86ae5a20cbad5aa720c7ed685325200b9d (patch) | |
tree | ce759de8c1949586ef2a2be3b1f1cbc8850b7121 /isys | |
parent | 7d724caa031e91e208d696be57f9fd38700de4bc (diff) | |
download | anaconda-0d308d86ae5a20cbad5aa720c7ed685325200b9d.tar.gz anaconda-0d308d86ae5a20cbad5aa720c7ed685325200b9d.tar.xz anaconda-0d308d86ae5a20cbad5aa720c7ed685325200b9d.zip |
register a parted exception handler for gui mode
modified isys.makeDevInode to use /dev/foo if it is there, while
preserving backwards compatible behavior
import fsset for workstation, it needs to find the ext2 filesystemtype
for some reason
skip drives that can't be opened or partition tables that can't be
read. we still need to handle 'fresh' disks better.
Diffstat (limited to 'isys')
-rw-r--r-- | isys/isys.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/isys/isys.py b/isys/isys.py index 219d8136f..eec388d56 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -196,8 +196,17 @@ def cdromList(): def moduleListByType(type): return _isys.modulelist(type) -def makeDevInode(name, fn): - return _isys.mkdevinode(name, fn) +def makeDevInode(name, fn=None): + if fn: + _isys.mkdevinode(name, fn) + return fn + path = '/dev/%s' % (name,) + try: + os.stat(path) + except OSError: + path = '/tmp/%s' % (name,) + _isys.mkdevinode(name, fn) + return path def inet_ntoa (addr): return "%d.%d.%d.%d" % ((addr >> 24) & 0x000000ff, |