summaryrefslogtreecommitdiffstats
path: root/Lib/quopri.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/quopri.py')
-rwxr-xr-xLib/quopri.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/quopri.py b/Lib/quopri.py
index 08899c5..f36cf7b 100755
--- a/Lib/quopri.py
+++ b/Lib/quopri.py
@@ -67,10 +67,7 @@ def encode(input, output, quotetabs, header=False):
output.write(s + lineEnd)
prevline = None
- while 1:
- line = input.readline()
- if not line:
- break
+ while line := input.readline():
outline = []
# Strip off any readline induced trailing newline
stripped = b''
@@ -126,9 +123,7 @@ def decode(input, output, header=False):
return
new = b''
- while 1:
- line = input.readline()
- if not line: break
+ while line := input.readline():
i, n = 0, len(line)
if n > 0 and line[n-1:n] == b'\n':
partial = 0; n = n-1