]> granicus.if.org Git - python/commitdiff
Patch # 1094 by Serge Julien. Fix some bytes/str comparisons.
authorGuido van Rossum <guido@python.org>
Mon, 10 Sep 2007 00:27:13 +0000 (00:27 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 10 Sep 2007 00:27:13 +0000 (00:27 +0000)
(Bah, the poplib test didn't catch this.)

Lib/poplib.py

index 323d915e1ba9baee7330e44b1de43bb4d9b64fc3..b50b0c79dba273a86d770ab288f2dc3a6f675ac2 100644 (file)
@@ -134,8 +134,8 @@ class POP3:
         resp = self._getresp()
         list = []; octets = 0
         line, o = self._getline()
-        while line != '.':
-            if line[:2] == '..':
+        while line != b'.':
+            if line[:2] == b'..':
                 o = o-1
                 line = line[1:]
             octets = octets + o