[Buildbot-commits] buildbot/buildbot twcompat.py,1.8,1.9

Brian Warner warner at users.sourceforge.net
Mon Dec 11 08:23:31 UTC 2006


Update of /cvsroot/buildbot/buildbot/buildbot
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2276/buildbot

Modified Files:
	twcompat.py 
Log Message:
[project @ remove all uses of buildbot.twcompat.maybeWait, now that we don't need to maintain Twisted-1.3.0 compatibility]

Original author: warner at lothar.com
Date: 2006-12-11 08:21:51

Index: twcompat.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/twcompat.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- twcompat.py	6 Sep 2006 00:41:54 -0000	1.8
+++ twcompat.py	11 Dec 2006 08:23:29 -0000	1.9
@@ -41,30 +41,6 @@
     from twisted.python.components import Interface
     providedBy = components.implements
 
-# are we using a version of Trial that allows setUp/testFoo/tearDown to
-# return Deferreds?
-oldtrial = version.startswith("1.3")
-
-# use this at the end of setUp/testFoo/tearDown methods
-def maybeWait(d, timeout="none"):
-    from twisted.python import failure
-    from twisted.trial import unittest
-    if oldtrial:
-        # this is required for oldtrial (twisted-1.3.0) compatibility. When we
-        # move to retrial (twisted-2.0.0), replace these with a simple 'return
-        # d'.
-        try:
-            if timeout == "none":
-                unittest.deferredResult(d)
-            else:
-                unittest.deferredResult(d, timeout)
-        except failure.Failure, f:
-            if f.check(unittest.SkipTest):
-                raise f.value
-            raise
-        return None
-    return d
-
 # waitForDeferred and getProcessOutputAndValue are twisted-2.0 things. If
 # we're running under 1.3, patch them into place. These versions are copied
 # from twisted somewhat after 2.0.1 .





More information about the Commits mailing list