Created
December 9, 2010 18:06
-
-
Save tomprince/735075 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/slave/buildslave/commands/fs.py b/slave/buildslave/commands/fs.py | |
index 730c4b1..1d5fddb 100644 | |
--- a/slave/buildslave/commands/fs.py | |
+++ b/slave/buildslave/commands/fs.py | |
@@ -66,8 +66,12 @@ class RemoveDirectory(base.Command): | |
if runtime.platformType != "posix": | |
# if we're running on w32, use rmtree instead. It will block, | |
# but hopefully it won't take too long. | |
- utils.rmdirRecursive(self.dir) | |
- return defer.succeed(0) | |
+ try: | |
+ utils.rmdirRecursive(self.dir) | |
+ self.sendStatus({'rc': 0}) | |
+ except: | |
+ self.sendStatus({'rc': 1}) | |
+ return | |
d = self._clobber(None) | |
d.addCallback(self._sendRC) | |
@@ -166,10 +170,8 @@ class CopyDirectory(base.Command): | |
command = ['cp', '-R', '-P', '-p', fromdir, todir] | |
c = runprocess.RunProcess(self.builder, command, self.builder.basedir, | |
- sendRC=False, timeout=self.timeout, maxTime=self.maxTime, | |
+ timeout=self.timeout, maxTime=self.maxTime, | |
usePTY=False) | |
self.command = c | |
d = c.start() | |
- d.addCallback(self._abandonOnFailure) | |
- d.addCallback(self._sendRC) | |
return d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment