expand @DATE@
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 20 Sep 2011 08:46:05 +0000 (10:46 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 20 Sep 2011 08:46:05 +0000 (10:46 +0200)
system/Substrate.py

index e145b20..8da463c 100644 (file)
@@ -317,7 +317,10 @@ class BuildBox (Box):
         for line in ps_lines:
             if not line.strip() or line.find('PID')>=0: continue
             m=BuildBox.matcher.match(line)
-            if m: self.add_build (m.group('buildname'),m.group('pid'))
+            if m: 
+                date=time.strftime('%Y-%m-%d',time.localtime(time.time()))
+                buildname=m.group('buildname').replace('@DATE@',date)
+                self.add_build (buildname,m.group('pid'))
             else: header('command %r returned line that failed to match'%command)
 
 ############################################################