diff treepkg/packager.py @ 336:5fa56edeb606

Changed the Build Logs to be gziped before they are published
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 13 Apr 2010 09:29:08 +0000
parents dd2bd0ccd674
children 28df50b267f6
line wrap: on
line diff
--- a/treepkg/packager.py	Thu Apr 08 10:18:49 2010 +0000
+++ b/treepkg/packager.py	Tue Apr 13 09:29:08 2010 +0000
@@ -275,7 +275,12 @@
         return None
 
     def has_build_log(self):
-        return os.path.exists(self.build_log)
+        return os.path.exists(self.get_log_file())
+
+    def get_log_file(self):
+        if os.path.exists(self.build_log + ".gz"):
+            return self.build_log + ".gz"
+        return self.build_log
 
     def list_log_files(self):
         """Returns a list describing the logfiles available for the revision.
@@ -285,7 +290,7 @@
         """
         files = []
         if self.has_build_log():
-            files.append(("build log", self.build_log))
+            files.append(("build log", self.get_log_file()))
         return files
 
     def list_source_files(self):
@@ -313,8 +318,7 @@
             if dsc_file is None:
                 raise RuntimeError("Cannot find dsc File in %r" % self.src_dir)
 
-            bin_packager = self.binary_packager_cls(self, dsc_file,
-                                                    self.build_log)
+            bin_packager = self.binary_packager_cls(self, dsc_file, self.build_log)
             bin_packager.package()
             self.status.stop = datetime.datetime.utcnow()
         except:
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)