mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +03:00 
			
		
		
		
	Fixed writing to temporary file
This commit is contained in:
		
							parent
							
								
									37d61f1e9b
								
							
						
					
					
						commit
						bc3925ead5
					
				|  | @ -132,9 +132,9 @@ elif sys.platform == "darwin": | ||||||
| 
 | 
 | ||||||
|         def show_file(self, file, **options): |         def show_file(self, file, **options): | ||||||
|             """Display given file""" |             """Display given file""" | ||||||
|             f, path = tempfile.mkstemp() |             fd, path = tempfile.mkstemp() | ||||||
|             f.write(file) |             with os.fdopen(fd, 'w') as f: | ||||||
|             f.close() |                 f.write(file) | ||||||
|             with open(path, "r") as f: |             with open(path, "r") as f: | ||||||
|                 subprocess.Popen([ |                 subprocess.Popen([ | ||||||
|                     'im=$(cat);' |                     'im=$(cat);' | ||||||
|  | @ -171,9 +171,9 @@ else: | ||||||
| 
 | 
 | ||||||
|         def show_file(self, file, **options): |         def show_file(self, file, **options): | ||||||
|             """Display given file""" |             """Display given file""" | ||||||
|             f, path = tempfile.mkstemp() |             fd, path = tempfile.mkstemp() | ||||||
|             f.write(file) |             with os.fdopen(fd, 'w') as f: | ||||||
|             f.close() |                 f.write(file) | ||||||
|             with open(path, "r") as f: |             with open(path, "r") as f: | ||||||
|                 command = self.get_command_ex(file, **options)[0] |                 command = self.get_command_ex(file, **options)[0] | ||||||
|                 subprocess.Popen([ |                 subprocess.Popen([ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user