diff options
author | Peter Jones <pjones@redhat.com> | 2008-04-01 17:53:35 -0400 |
---|---|---|
committer | Peter Jones <pjones@pjones2.localdomain> | 2008-04-01 17:53:35 -0400 |
commit | 555212073bc84e035fed97a9d102a32084940d81 (patch) | |
tree | f591c2f9defc788e78b00bd7397d003eacfd913d /isys/isys.py | |
parent | a1b90dcd84df1a1e3a9c0a881a5b366a602808c0 (diff) | |
download | anaconda-555212073bc84e035fed97a9d102a32084940d81.tar.gz anaconda-555212073bc84e035fed97a9d102a32084940d81.tar.xz anaconda-555212073bc84e035fed97a9d102a32084940d81.zip |
Avoid AttributeError in HardDriveDict (#432362)
Diffstat (limited to 'isys/isys.py')
-rwxr-xr-x | isys/isys.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/isys/isys.py b/isys/isys.py index 5cb63030f..6dc7f7542 100755 --- a/isys/isys.py +++ b/isys/isys.py @@ -503,7 +503,10 @@ def hardDriveDict(): ret = {} dict = driveDict("disk") for item in dict.keys(): - ret[item] = dict[item]['description'] + try: + ret[item] = dict[item]['description'] + except AttributeError: + ret[item] = "" return ret ## Get all the removable drives attached to the system. @@ -519,7 +522,10 @@ def removableDriveDict(): dict = driveDict("disk") for item in dict.keys(): if dict[item]['storage.removable'] != 0: - ret[item] = dict[item]['description'] + try: + ret[item] = dict[item]['description'] + except AttributeError: + ret[item] = "" return ret ## Get all CD/DVD drives attached to the system. |