diff options
author | Georg Brandl <georg@python.org> | 2008-01-21 17:22:06 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-01-21 17:22:06 (GMT) |
commit | 1ea8cb49ed728dadec11d0a554431c566fdc5a56 (patch) | |
tree | c4e487e2d224711791204e45e7bd9e2acc36b5a1 /Tools | |
parent | af67f303d8077b3b08e4baa03feae5f618fae757 (diff) | |
download | cpython-1ea8cb49ed728dadec11d0a554431c566fdc5a56.zip cpython-1ea8cb49ed728dadec11d0a554431c566fdc5a56.tar.gz cpython-1ea8cb49ed728dadec11d0a554431c566fdc5a56.tar.bz2 |
#1726198: replace while 1: fp.readline() with file iteration.
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/pynche/ColorDB.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Tools/pynche/ColorDB.py b/Tools/pynche/ColorDB.py index 96b6ce6..84a5b07 100644 --- a/Tools/pynche/ColorDB.py +++ b/Tools/pynche/ColorDB.py @@ -50,10 +50,7 @@ class ColorDB: self.__byname = {} # all unique names (non-aliases). built-on demand self.__allnames = None - while 1: - line = fp.readline() - if not line: - break + for line in fp: # get this compiled regular expression from derived class mo = self._re.match(line) if not mo: |