Added handling of missing aiohttp module

This commit is contained in:
pythongosssss 2023-02-12 18:32:20 +00:00 committed by GitHub
parent 639d21e5f7
commit f616dcc81a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

13
main.py
View File

@ -7,6 +7,16 @@ import heapq
import traceback
import asyncio
try:
import aiohttp
from aiohttp import web
except ImportError:
print("Module 'aiohttp' not installed. Please install it via:")
print("pip install aiohttp")
print("or")
print("pip install -r requirements.txt")
sys.exit()
if __name__ == "__main__":
if '--help' in sys.argv:
print("Valid Command line Arguments:")
@ -346,9 +356,6 @@ class PromptQueue:
return True
return False
import aiohttp
from aiohttp import web
def get_queue_info(prompt_queue):
prompt_info = {}
exec_info = {}