Revision 5efc50fc scripts/gnt-os
b/scripts/gnt-os | ||
---|---|---|
75 | 75 |
""" |
76 | 76 |
|
77 | 77 |
if _DiagnoseOSValid(obj): |
78 |
return "valid (path: %s)" % obj.path
|
|
78 |
return "valid"
|
|
79 | 79 |
else: |
80 |
return "%s (path: %s)" % (obj.args[2], obj.args[1]) |
|
80 |
return obj.args[2] |
|
81 |
|
|
82 |
|
|
83 |
def _DiagnoseOSPath(obj): |
|
84 |
"""Get the path out of an OS diagnose object. |
|
85 |
|
|
86 |
Args: |
|
87 |
obj: an diagnostic object as returned by OpDiagnoseOS |
|
88 |
|
|
89 |
Returns: |
|
90 |
string: the OS path |
|
91 |
|
|
92 |
""" |
|
93 |
if _DiagnoseOSValid(obj): |
|
94 |
return obj.path |
|
95 |
else: |
|
96 |
return obj.args[1] |
|
81 | 97 |
|
82 | 98 |
|
83 | 99 |
def _DiagnoseByOS(rlist): |
Also available in: Unified diff