[Buildbot-commits] buildbot/buildbot/status base.py, 1.6, 1.7 builder.py, 1.97, 1.98 html.py, 1.102, 1.103 tests.py, 1.2, 1.3 words.py, 1.50, 1.51

Brian Warner warner at users.sourceforge.net
Thu Aug 2 00:07:20 UTC 2007


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

Modified Files:
	base.py builder.py html.py tests.py words.py 
Log Message:
[project @ bring import statements up-to-date, remove spurious shebang lines]

Original author: warner at lothar.com
Date: 2007-08-01 23:59:37+00:00

Index: base.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/base.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- base.py	11 Dec 2006 09:06:35 -0000	1.6
+++ base.py	2 Aug 2007 00:07:18 -0000	1.7
@@ -1,4 +1,3 @@
-#! /usr/bin/python
 
 from zope.interface import implements
 from twisted.application import service

Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -d -r1.97 -r1.98
--- builder.py	1 Aug 2007 23:42:27 -0000	1.97
+++ builder.py	2 Aug 2007 00:07:18 -0000	1.98
@@ -1,7 +1,5 @@
 # -*- test-case-name: buildbot.test.test_status -*-
 
-from __future__ import generators
-
 from zope.interface import implements
 from twisted.python import log
 from twisted.persisted import styles
@@ -9,11 +7,7 @@
 from twisted.protocols import basic
 
 import os, shutil, sys, re, urllib
-try:
-    import cPickle
-    pickle = cPickle
-except ImportError:
-    import pickle
+from cPickle import load, dump
 from cStringIO import StringIO
 
 # sibling imports
@@ -1255,7 +1249,7 @@
             shutil.rmtree(filename, ignore_errors=True)
         tmpfilename = filename + ".tmp"
         try:
-            pickle.dump(self, open(tmpfilename, "wb"), -1)
+            dump(self, open(tmpfilename, "wb"), -1)
             if sys.platform == 'win32':
                 # windows cannot rename a file on top of an existing one, so
                 # fall back to delete-first. There are ways this can fail and
@@ -1384,7 +1378,7 @@
         filename = os.path.join(self.basedir, "builder")
         tmpfilename = filename + ".tmp"
         try:
-            pickle.dump(self, open(tmpfilename, "wb"), -1)
+            dump(self, open(tmpfilename, "wb"), -1)
             if sys.platform == 'win32':
                 # windows cannot rename a file on top of an existing one
                 if os.path.exists(filename):
@@ -1413,7 +1407,7 @@
                 return build
         filename = os.path.join(self.basedir, "%d" % number)
         try:
-            build = pickle.load(open(filename, "rb"))
+            build = load(open(filename, "rb"))
             styles.doUpgrade()
             build.builder = self
             # handle LogFiles from after 0.5.0 and before 0.6.5
@@ -1866,7 +1860,7 @@
         log.msg("trying to load status pickle from %s" % filename)
         builder_status = None
         try:
-            builder_status = pickle.load(open(filename, "rb"))
+            builder_status = load(open(filename, "rb"))
             styles.doUpgrade()
         except IOError:
             log.msg("no saved status pickle, creating a new one")

Index: html.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- html.py	1 Aug 2007 22:08:37 -0000	1.102
+++ html.py	2 Aug 2007 00:07:18 -0000	1.103
@@ -1,4 +1,3 @@
-#! /usr/bin/python
 
 # compatibility wrapper. This is currently the preferred place for master.cfg
 # to import from.

Index: tests.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/tests.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- tests.py	12 Dec 2006 03:24:03 -0000	1.2
+++ tests.py	2 Aug 2007 00:07:18 -0000	1.3
@@ -1,4 +1,3 @@
-#! /usr/bin/python
 
 from twisted.web import resource
 from twisted.web.error import NoResource

Index: words.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/words.py,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- words.py	17 Jun 2007 21:10:32 -0000	1.50
+++ words.py	2 Aug 2007 00:07:18 -0000	1.51
@@ -1,4 +1,3 @@
-#! /usr/bin/python
 
 # code to deliver build status through twisted.words (instant messaging
 # protocols: irc, etc)





More information about the Commits mailing list