You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2010/08/03 19:15:09 UTC
svn commit: r981972 - /incubator/vcl/sandbox/xcat2partimageng/listener.py
Author: jfthomps
Date: Tue Aug 3 17:15:08 2010
New Revision: 981972
URL: http://svn.apache.org/viewvc?rev=981972&view=rev
Log:
modified pattern matching that follows the install log
Modified:
incubator/vcl/sandbox/xcat2partimageng/listener.py
Modified: incubator/vcl/sandbox/xcat2partimageng/listener.py
URL: http://svn.apache.org/viewvc/incubator/vcl/sandbox/xcat2partimageng/listener.py?rev=981972&r1=981971&r2=981972&view=diff
==============================================================================
--- incubator/vcl/sandbox/xcat2partimageng/listener.py (original)
+++ incubator/vcl/sandbox/xcat2partimageng/listener.py Tue Aug 3 17:15:08 2010
@@ -57,13 +57,15 @@ try:
line = linecache.getline(ilog,count)
linecache.clearcache()
if(line and not done and not gzipping):
- r1 = re.compile("(\d+)/(\d+) - ([\d\.]+)")
- m1 = r1.search(line)
+ m1 = re.search("(\d+)/(\d+) - ([\d\.]+)", line)
+ m2 = re.search("([^\s]+)[\s]+gzip[\s]+T:([0-9:]+)/([0-9:]+)[\s]+R:([^\s]+)[\s]+P:[\s]*([0-9]+)", line)
if m1:
- newline = "%s partition %s of %s: %s %%" % (action, str(m1.group(1)), str(m1.group(2)), str(m1.group(3)))
+ newline = "partimage-ng: %s partition %s of %s: %s %%" % (action, str(m1.group(1)), str(m1.group(2)), str(m1.group(3)))
+ elif m2:
+ newline = "partimage: %s %s Percent:%s%% Elapsed:%s Remaining:%s Rate:%s" % (action, str(m2.group(1)), str(m2.group(5)), str(m2.group(2)), str(m2.group(3)), str(m2.group(4)))
else:
- newline = "unknown progress"
- line = "partimage-ng: " + newline
+ newline = "partimage: unknown progress"
+ line = newline
elif(not line):
line = "partimage-ng: unknown progress"
elif(done):