Skip to content

Commit

Permalink
Change variable name in _read_magic()
Browse files Browse the repository at this point in the history
  • Loading branch information
Piolie committed Jan 31, 2021
1 parent 39288f0 commit b43654d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/PIL/PpmImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ class PpmImageFile(ImageFile.ImageFile):
format = "PPM"
format_description = "Pbmplus image"

def _read_magic(self, s=b""):
def _read_magic(self, magic=b""):
while True: # read until next whitespace
c = self.fp.read(1)
if c in B_WHITESPACE:
break
s = s + c
if len(s) > 6: # exceeded max magic number length
magic += c
if len(magic) > 6: # exceeded max magic number length
break
return s
return magic

def _read_token(self, token=b""):
def _ignore_comment(): # ignores rest of the line; stops at CR, LF or EOF
Expand Down

0 comments on commit b43654d

Please sign in to comment.