changeset 140:0da76aee8035

Add RevisionPackager method list_log_files which returns a description of the log files available for that revision
author Bernhard Herzog <bh@intevation.de>
date Mon, 02 Jun 2008 15:46:41 +0000
parents a7fa22320c3f
children 2c942b75b98b
files treepkg/packager.py
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/treepkg/packager.py	Mon Jun 02 15:01:34 2008 +0000
+++ b/treepkg/packager.py	Mon Jun 02 15:46:41 2008 +0000
@@ -238,6 +238,17 @@
     def has_build_log(self):
         return os.path.exists(self.build_log)
 
+    def list_log_files(self):
+        """Returns a list describing the logfiles available for the revision.
+        Each list item is a tuple of the form (TITLE, FILENAME) where
+        TITLE is a string with a title usable in e. g. a web-page, and
+        FILENAME is the absolute filename of the log file.
+        """
+        files = []
+        if self.has_build_log():
+            files.append(("build log", self.build_log))
+        return files
+
     def list_source_files(self):
         """Returns a list with the names of the files of the source package.
         The implementation assumes that all files in self.src_dir belong
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)