FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 02-03-2010, 06:47 PM
Chris Lumens
 
Default Strip off the timestamp from error output pulled from program.log.

> diff --git a/storage/devicelibs/lvm.py b/storage/devicelibs/lvm.py
> index fb9482b..a0b01e7 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 = ""
>

Looks fine, though I wonder how slow/memory-intensive this will be when
program.log gets very large. Probably not an issue, though.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 10:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org