﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
157	flappclient 'upload-file' error-handling bug	Brian Warner		"In http://tahoe-lafs.org/buildbot/builders/Kyle%20OpenBSD-4.6%20amd64/builds/369/steps/upload%20cov/logs/stdio it was clear that source:foolscap/appserver/services.py#L122 ({{{FileUploader.remote_putfile._err}}}) has a bug: the errback call uses ""{{{f}}}"" to hold the failure object, but this shadows the earlier use of ""{{{f}}}"" to hold the open file object. In an error case (such as when the uploader disconnects), this will throw an exception, and will probably leave the tempfile lying around.

{{{
flappclient --furlfile ../../upload-coverage.furl upload-file cov-*.tar.bz2
...
Command failed:
[CopiedFailure instance: Traceback from remote host -- Traceback (most recent call last):
  File ""/usr/lib/python2.6/dist-packages/twisted/internet/defer.py"", line 371, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File ""/usr/lib/pymodules/python2.6/foolscap/appserver/services.py"", line 66, in _got_error
    self.d.errback(f)
  File ""/usr/lib/python2.6/dist-packages/twisted/internet/defer.py"", line 307, in errback
    self._startRunCallbacks(fail)
  File ""/usr/lib/python2.6/dist-packages/twisted/internet/defer.py"", line 354, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File ""/usr/lib/python2.6/dist-packages/twisted/internet/defer.py"", line 371, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File ""/usr/lib/pymodules/python2.6/foolscap/appserver/services.py"", line 123, in _err
    f.close()
exceptions.AttributeError: Failure instance has no attribute 'close'
]
program finished with exit code 255
}}}
"	defect	closed	major	0.6.0	error-handling	0.5.1	fixed		
