changeset 11666:def08249d4db

chunkbuffer: use for/else to detect end of iteration
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sat, 24 Jul 2010 15:20:29 +0200
parents 1f7f8bc45240
children 78d1e92ba1c0
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Sat Jul 24 00:15:29 2010 +0200
+++ b/mercurial/util.py	Sat Jul 24 15:20:29 2010 +0200
@@ -932,7 +932,7 @@
                 collected += len(chunk)
                 if collected >= targetsize:
                     break
-            if collected < targetsize:
+            else:
                 self.iter = False
             self.buf = collector.getvalue()
         if len(self.buf) == l: