zypper-log: fix regex to match hostnames with embeded '-' too.
authorMichael Andres <ma@suse.de>
Fri, 2 Dec 2011 10:23:00 +0000 (11:23 +0100)
committerMichael Andres <ma@suse.de>
Fri, 2 Dec 2011 10:23:00 +0000 (11:23 +0100)
tools/zypper-log

index 918adf8..890ece2 100755 (executable)
@@ -96,7 +96,7 @@ def printLogByPID(logfiles, pid, date = False):
   if not date:
     date = "\d{4}-\d{2}-\d{2}"
   output = []
-  c = re.compile(r"%s \d{2}:\d{2}:\d{2} \<\d\> \w+\(%d\).+" % (date, pid))
+  c = re.compile(r"%s \d{2}:\d{2}:\d{2} \<\d+\> [^(]+\(%d\).+" % (date, pid))
 
   for logfile in logfiles:
     print >> sys.stderr, "Reading %s" % logfile, '.' * (filenamelen - len(logfile) + 3),