~smoser/simplestreams/trunk

Viewing all changes in revision 419.

  • Committer: Scott Moser
  • Date: 2015-12-08 20:35:31 UTC
  • mfrom: (417.1.13 fix-1523682)
  • Revision ID: smoser@ubuntu.com-20151208203531-fffbjhq37ho1399s
sanitize size parameter to read on Readers 

This fixes the read() calls in Urllib2UrlReader, RequestsUrlReader, 
and the new FileReader so that they all support:
  read(-1)
  read(None)
  read()
and pass the correct value down to the python below it.
Essentially, python3 prefers read(size=None) while python2 prefers
read(size-1) if the size is passed explicitly rather than using
read().

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: