mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Change variable name in _read_magic()
				
					
				
			This commit is contained in:
		
							parent
							
								
									39288f0fb0
								
							
						
					
					
						commit
						b43654d159
					
				| 
						 | 
					@ -49,15 +49,15 @@ class PpmImageFile(ImageFile.ImageFile):
 | 
				
			||||||
    format = "PPM"
 | 
					    format = "PPM"
 | 
				
			||||||
    format_description = "Pbmplus image"
 | 
					    format_description = "Pbmplus image"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _read_magic(self, s=b""):
 | 
					    def _read_magic(self, magic=b""):
 | 
				
			||||||
        while True:  # read until next whitespace
 | 
					        while True:  # read until next whitespace
 | 
				
			||||||
            c = self.fp.read(1)
 | 
					            c = self.fp.read(1)
 | 
				
			||||||
            if c in B_WHITESPACE:
 | 
					            if c in B_WHITESPACE:
 | 
				
			||||||
                break
 | 
					                break
 | 
				
			||||||
            s = s + c
 | 
					            magic += c
 | 
				
			||||||
            if len(s) > 6:  # exceeded max magic number length
 | 
					            if len(magic) > 6:  # exceeded max magic number length
 | 
				
			||||||
                break
 | 
					                break
 | 
				
			||||||
        return s
 | 
					        return magic
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _read_token(self, token=b""):
 | 
					    def _read_token(self, token=b""):
 | 
				
			||||||
        def _ignore_comment():  # ignores rest of the line; stops at CR, LF or EOF
 | 
					        def _ignore_comment():  # ignores rest of the line; stops at CR, LF or EOF
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user