diff options
author | David Cantrell <dcantrell@redhat.com> | 2007-04-20 20:09:41 +0000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2007-04-20 20:09:41 +0000 |
commit | 0fed98fbd4461cc28343c2f6912bc9341b3b8616 (patch) | |
tree | b1dbe9aad8e760b1825cb2c0478405d2d2fc20ee /isys | |
parent | 9aeb91119a4fb54ac33b6e72ceb1e8e5fdc0ae5d (diff) | |
download | anaconda-0fed98fbd4461cc28343c2f6912bc9341b3b8616.tar.gz anaconda-0fed98fbd4461cc28343c2f6912bc9341b3b8616.tar.xz anaconda-0fed98fbd4461cc28343c2f6912bc9341b3b8616.zip |
* isys/isys.py (getLinkStatus): Be a little more intelligent about what
we get from _isys.getLinkStatus(). -1 is unknown state, which will map
to True in the calling Python function. Only return True when we get a
1 back, otherwise False (#236483).
Diffstat (limited to 'isys')
-rw-r--r-- | isys/isys.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/isys/isys.py b/isys/isys.py index 06a0b755e..10045655f 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -876,7 +876,14 @@ def ideCdRwList(): return newList def getLinkStatus(dev): - return _isys.getLinkStatus(dev) + if dev == '' or dev is None: + return False + + # getLinkStatus returns 1 for link, 0 for no link, -1 for unknown state + if _isys.getLinkStatus(dev) == 1: + return True + else: + return False def getMacAddress(dev): return _isys.getMacAddress(dev) |