[SCM] build.samba.org - branch master updated

Jelmer Vernooij jelmer at samba.org
Fri Nov 12 12:23:35 MST 2010


The branch, master has been updated
       via  969a9d5 Unconfuse repr and str for BuildStatus.
      from  437a715 Print build status when verbose.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 969a9d523ab757bc4abf49ed1d818cabb5d4fd5e
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Nov 12 20:24:27 2010 +0100

    Unconfuse repr and str for BuildStatus.

-----------------------------------------------------------------------

Summary of changes:
 buildfarm/data.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 4e4138d..fb34ad7 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -55,7 +55,7 @@ class BuildStatus(object):
     def __str__(self):
         if self.other_failures:
             return ",".join(self.other_failures)
-        return "/".join([x[1] for x in self.stages])
+        return "/".join(self._status_tuple())
 
     def broken_host(self):
         if "disk full" in self.other_failures:
@@ -89,8 +89,8 @@ class BuildStatus(object):
         else:
             return cmp(other.stages, self.stages)
 
-    def __str__(self):
-        return repr((self.stages, self.other_failures))
+    def __repr__(self):
+        return "%s(%r)" % (self.__class__.__name__, (self.stages, self.other_failures))
 
 
 def check_dir_exists(kind, path):
@@ -346,12 +346,12 @@ class CachingBuild(Build):
             st2 = None
 
         if st2 and st1.st_ctime <= st2.st_mtime:
-            return BuildStatus(*eval(util.FileLoad(cachefile)))
+            return eval(util.FileLoad(cachefile))
 
         ret = super(CachingBuild, self).status()
 
         if not self._store.readonly:
-            util.FileSave(cachefile, str(ret))
+            util.FileSave(cachefile, repr(ret))
 
         return ret
 


-- 
build.samba.org


More information about the samba-cvs mailing list