diff options
Diffstat (limited to 'Lib/mailcap.py')
-rw-r--r-- | Lib/mailcap.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/mailcap.py b/Lib/mailcap.py index 7278ea7..2f4656e 100644 --- a/Lib/mailcap.py +++ b/Lib/mailcap.py @@ -90,9 +90,7 @@ def _readmailcapfile(fp, lineno): the viewing command is stored with the key "view". """ caps = {} - while 1: - line = fp.readline() - if not line: break + while line := fp.readline(): # Ignore comments and blank lines if line[0] == '#' or line.strip() == '': continue |