[Buildbot-commits] buildbot/buildbot/steps transfer.py,1.6,1.7

Brian Warner warner at users.sourceforge.net
Sat Dec 9 19:25:58 UTC 2006


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

Modified Files:
	transfer.py 
Log Message:
[project @ filetransfer: handle errors better]

Original author: warner at lothar.com
Date: 2006-12-09 19:19:51

Index: transfer.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/transfer.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- transfer.py	9 Dec 2006 09:16:36 -0000	1.6
+++ transfer.py	9 Dec 2006 19:25:56 -0000	1.7
@@ -47,8 +47,9 @@
     def __del__(self):
         # unclean shutdown, the file is probably truncated, so delete it
         # altogether rather than deliver a corrupted file
-        if self.fp is not None:
-            self.fp.close()
+        fp = getattr(self, "fp", None)
+        if fp:
+            fp.close()
             os.unlink(self.destfile)
 
 





More information about the Commits mailing list