examples: add one more comment

This commit is contained in:
David Wilson 2018-12-07 21:01:50 +00:00
parent 9ddedf9455
commit f203744b48
1 changed files with 5 additions and 0 deletions

View File

@ -44,7 +44,12 @@ def streamy_download_file(context, path):
Fetch a file from the FileService hosted by `context`. Fetch a file from the FileService hosted by `context`.
""" """
bio = io.BytesIO() bio = io.BytesIO()
# FileService.get() is not actually an exposed service method, it's just a
# classmethod that wraps up the complicated dance of implementing the
# transfer.
ok, metadata = mitogen.service.FileService.get(context, path, bio) ok, metadata = mitogen.service.FileService.get(context, path, bio)
return { return {
'success': ok, 'success': ok,
'metadata': metadata, 'metadata': metadata,