Register HEIF opener and handle terminal import error gracefully
This commit is contained in:
		
							parent
							
								
									2808952153
								
							
						
					
					
						commit
						f0d2a7cc05
					
				| @ -3,7 +3,11 @@ import json | ||||
| import yaml | ||||
| import asyncio | ||||
| import subprocess | ||||
| import pty  | ||||
| try: | ||||
|     import pty | ||||
| except Exception as ex: | ||||
|     print("You are not able to run a terminal. See error:") | ||||
|     print(ex) | ||||
| import os | ||||
| 
 | ||||
| class ComposeFileManager: | ||||
|  | ||||
| @ -7,9 +7,11 @@ from os.path import isfile | ||||
| import aiofiles | ||||
| from aiohttp import web | ||||
| from PIL import Image | ||||
| from pillow_heif import register_heif_opener | ||||
| 
 | ||||
| from snek.system.view import BaseView | ||||
| 
 | ||||
| register_heif_opener() | ||||
| 
 | ||||
| class ChannelAttachmentView(BaseView): | ||||
|     async def get(self): | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 BordedDev
						BordedDev