Skip to content

Commit

Permalink
test uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin J. Mitchell committed Aug 22, 2010
1 parent 14a5964 commit 3dec739
Show file tree
Hide file tree
Showing 2 changed files with 219 additions and 33 deletions.
10 changes: 5 additions & 5 deletions slave/buildslave/commands/transfer.py
Expand Up @@ -38,7 +38,7 @@ def start(self):
try:
self.fp = open(self.path, 'rb')
if self.debug:
log.msg('Opened %r for upload' % self.path)
log.msg("Opened '%s' for upload" % self.path)
except:
self.fp = None
self.stderr = "Cannot open file '%s' for upload" % self.path
Expand Down Expand Up @@ -143,7 +143,7 @@ class SlaveDirectoryUploadCommand(SlaveFileUploadCommand):
- ['blocksize']: max size for each data block
- ['compress']: one of [None, 'bz2', 'gz']
"""
debug = True
debug = False

def setup(self, args):
self.workdir = args['workdir']
Expand Down Expand Up @@ -248,7 +248,7 @@ def start(self):
try:
self.fp = open(self.path, 'wb')
if self.debug:
log.msg('Opened %r for download' % self.path)
log.msg("Opened '%s' for download" % self.path)
if self.mode is not None:
# note: there is a brief window during which the new file
# will have the buildslave's default (umask) mode before we
Expand Down Expand Up @@ -304,7 +304,7 @@ def _readBlock(self):

if length <= 0:
if self.stderr is None:
self.stderr = 'Maximum filesize reached, truncating file %r' \
self.stderr = "Maximum filesize reached, truncating file '%s'" \
% self.path
self.rc = 1
return True
Expand Down Expand Up @@ -332,7 +332,7 @@ def interrupt(self):
if self.interrupted:
return
if self.stderr is None:
self.stderr = 'Download of %r interrupted' % self.path
self.stderr = "Download of '%s' interrupted" % self.path
self.rc = 1
self.interrupted = True
# now we wait for the next read request to return. _readBlock will
Expand Down

0 comments on commit 3dec739

Please sign in to comment.