diff options
author | David Lehman <dlehman@redhat.com> | 2010-02-03 13:09:39 -0600 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2010-02-03 13:09:39 -0600 |
commit | 40d546a3e090c86357ed7f17443764502151d2b8 (patch) | |
tree | 8a4cb6c75ba730ca50d34d018149d4a8b35d002c /storage | |
parent | a04a797e91ef70646b33f8e37f2d6b7b9dd47d85 (diff) | |
download | anaconda-40d546a3e090c86357ed7f17443764502151d2b8.tar.gz anaconda-40d546a3e090c86357ed7f17443764502151d2b8.tar.xz anaconda-40d546a3e090c86357ed7f17443764502151d2b8.zip |
Strip off the timestamp from error output pulled from program.log.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/devicelibs/lvm.py | 4 | ||||
-rw-r--r-- | storage/devicelibs/mdraid.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/storage/devicelibs/lvm.py b/storage/devicelibs/lvm.py index fb9482b17..a0b01e7cd 100644 --- a/storage/devicelibs/lvm.py +++ b/storage/devicelibs/lvm.py @@ -167,7 +167,9 @@ def lvm(args, progress=None): return try: - msg = open("/tmp/program.log").readlines()[-1].strip() + # grab the last line of program.log and strip off the timestamp + msg = open("/tmp/program.log").readlines()[-1] + msg = msg.split(" : ", 1)[1].strip() except Exception: msg = "" diff --git a/storage/devicelibs/mdraid.py b/storage/devicelibs/mdraid.py index 589fb36f7..5cf8cb49f 100644 --- a/storage/devicelibs/mdraid.py +++ b/storage/devicelibs/mdraid.py @@ -133,7 +133,9 @@ def mdadm(args, progress=None): return try: - msg = open("/tmp/program.log").readlines()[-1].strip() + # grab the last line of program.log and strip off the timestamp + msg = open("/tmp/program.log").readlines()[-1] + msg = msg.split(" : ", 1)[1].strip() except Exception: msg = "" |