diff contrib/sawmill/web/details.py @ 474:a8f77807d710

sawmill: create links for tag builds
author Sascha Teichmann <teichmann@intevation.de>
date Fri, 10 Sep 2010 14:18:07 +0000
parents d8012571f9e1
children 28aa6ac933fb
line wrap: on
line diff
--- a/contrib/sawmill/web/details.py	Fri Sep 10 10:46:50 2010 +0000
+++ b/contrib/sawmill/web/details.py	Fri Sep 10 14:18:07 2010 +0000
@@ -43,6 +43,7 @@
         self.start       = None
         self.stop        = None
         self.logs        = None
+        self.tags        = None
 
     def check_loaded(self):
         if not self.loaded:
@@ -56,6 +57,7 @@
                     if   key == 'status': self.status = value
                     elif key == 'start':  self.start  = _create_time(value)
                     elif key == 'stop':   self.stop   = _create_time(value)
+                    elif key == 'tags':   self.tags   = value
             finally:
                 f.close()
             self.loaded = True
@@ -72,6 +74,10 @@
         self.check_loaded()
         return self.stop
 
+    def get_tags(self):
+        self.check_loaded()
+        return self.tags
+
     def log_path(self, log):
         return "%s/tracks/%s/pkg/%s/log/%s" % (
             self.treepkg, self.track, self.revision, log)
@@ -92,13 +98,14 @@
     build_start  = property(get_build_start)
     build_stop   = property(get_build_stop)
     build_logs   = property(get_build_logs)
+    build_tags   = property(get_tags)
 
 
 def __scan_track_items(treepkg, path):
     items = []
 
     tracks_path = os.path.join(path, "tracks")
-    if os.path.isdir(track_path):
+    if os.path.isdir(tracks_path):
         for track in os.listdir(tracks_path):
             track_path = os.path.join(tracks_path, track)
             if not os.path.isdir(track_path): continue
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)