Skip to content

Commit

Permalink
Merge branch 'master' into doc-agent-param
Browse files Browse the repository at this point in the history
  • Loading branch information
twm authored Feb 8, 2019
2 parents 333b22e + e85b37a commit c4829a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/examples/download_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def download_file(reactor, url, destination_filename):
destination = open(destination_filename, 'wb')
d = treq.get(url)
d = treq.get(url, unbuffered=True)
d.addCallback(treq.collect, destination.write)
d.addBoth(lambda _: destination.close())
return d
Expand Down

0 comments on commit c4829a8

Please sign in to comment.