- Make the layer going over the estimated size raise an exception

- Add a heuristic for estimating the layer size if it is 0
- Add a method where we can add a custom defined map of image -> size
This commit is contained in:
Joseph Schorr 2014-09-29 12:54:22 -04:00
parent 297c8ad29c
commit 746936ce66
4 changed files with 37 additions and 35 deletions

View file

@ -22,7 +22,11 @@ class QueueFile(object):
if result is None:
self._done = True
break
if isinstance(result, Exception):
self._closed = True
raise result
self._buffer += result
self._total_size += len(result)