[Buildbot-devel] build-slave python 2.3 compatibility

Douglas Leeder douglas.leeder at sophos.com
Fri Jul 9 12:47:55 UTC 2010


build-slave 0.8.1 needs the following patch to be python 2.3 compatible:

--- buildslave/commands/base.py 2010-07-07 06:46:01.000000000 +0100
+++ /usr/lib/python2.3/site-packages/buildslave/commands/base.py
2010-07-25 16:53:59.000000000 +0100
@@ -60,14 +60,13 @@
      def __repr__(self):
          return `self.fake`

-    @staticmethod
      def to_text(s):
          if isinstance(s, (str, unicode)):
              return s
          else:
              return str(s)
+    to_text=static_method(to_text)

-    @staticmethod
      def get_real(command):
          rv = command
          if type(command) == types.ListType:
@@ -78,8 +77,8 @@
                  else:
                      rv.append(Obfuscated.to_text(elt))
          return rv
+    get_real=static_method(get_real)

-    @staticmethod
      def get_fake(command):
          rv = command
          if type(command) == types.ListType:
@@ -90,6 +89,7 @@
                  else:
                      rv.append(Obfuscated.to_text(elt))
          return rv
+    get_fake=static_method(get_fake)

  class AbandonChain(Exception):
      """A series of chained steps can raise this exception to indicate that

--
Douglas Leeder, Senior Software Engineer

Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 348 3873 20.




More information about the devel mailing list