Let Uploader retain History instead of passing it into upload(). Fixes #1079.

This consistently records all immutable uploads in the Recent Uploads And
Downloads page, regardless of code path. Previously, certain webapi upload
operations (like PUT /uri/$DIRCAP/newchildname) failed to pass the History
object and were left out.
This commit is contained in:
Brian Warner
2011-08-28 23:32:46 -07:00
parent 9756146d61
commit fd676a5846
4 changed files with 10 additions and 8 deletions

View File

@ -278,7 +278,8 @@ class Client(node.Node, pollmixin.PollMixin):
self.history = History(self.stats_provider)
self.terminator = Terminator()
self.terminator.setServiceParent(self)
self.add_service(Uploader(helper_furl, self.stats_provider))
self.add_service(Uploader(helper_furl, self.stats_provider,
self.history))
self.init_stub_client()
self.init_blacklist()
self.init_nodemaker()
@ -513,4 +514,4 @@ class Client(node.Node, pollmixin.PollMixin):
def upload(self, uploadable):
uploader = self.getServiceNamed("uploader")
return uploader.upload(uploadable, history=self.get_history())
return uploader.upload(uploadable)