]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Strip \r as trailing whitespace as part of soft line endings.
authorGuido van Rossum <guido@python.org>
Thu, 22 Mar 2001 22:30:21 +0000 (22:30 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 22 Mar 2001 22:30:21 +0000 (22:30 +0000)
Inspired by SF patch #408597 (Walter Dörwald): quopri, soft line
breaks and CRLF.  (I changed (" ", "\t", "\r") into " \t\r".)

Lib/quopri.py

index 5f5e80c6dbfbd8bea1031704744bb66974485c6b..e7e4beccda2558d37dafdd0eca88c8f12f1495a6 100755 (executable)
@@ -65,7 +65,7 @@ def decode(input, output):
         if n > 0 and line[n-1] == '\n':
             partial = 0; n = n-1
             # Strip trailing whitespace
-            while n > 0 and line[n-1] in (' ', '\t'):
+            while n > 0 and line[n-1] in " \t\r":
                 n = n-1
         else:
             partial = 1