Fix crash caused by variable initailise

This commit is contained in:
hibobmaster 2023-06-01 09:59:27 +08:00
parent f5e5e6fb4f
commit 985db37be2
Signed by: bobmaster
SSH key fingerprint: SHA256:5ZYgd8fg+PcNZNy4SzcSKu5JtqZyBF8kUhY7/k2viDk

4
bot.py
View file

@ -87,6 +87,7 @@ class Bot:
self.import_keys_password = import_keys_password self.import_keys_password = import_keys_password
self.flowise_api_url = flowise_api_url self.flowise_api_url = flowise_api_url
self.flowise_api_key = flowise_api_key self.flowise_api_key = flowise_api_key
self.pandora_api_endpoint = pandora_api_endpoint
self.session = aiohttp.ClientSession() self.session = aiohttp.ClientSession()
@ -184,7 +185,6 @@ class Bot:
# initialize pandora # initialize pandora
if pandora_api_endpoint is not None: if pandora_api_endpoint is not None:
self.pandora_api_endpoint = pandora_api_endpoint
self.pandora = Pandora( self.pandora = Pandora(
api_endpoint=pandora_api_endpoint, clientSession=self.session api_endpoint=pandora_api_endpoint, clientSession=self.session
) )
@ -193,7 +193,7 @@ class Bot:
else: else:
self.pandora_api_model = pandora_api_model self.pandora_api_model = pandora_api_model
self.pandora_data = {} self.pandora_data = {}
def __del__(self): def __del__(self):
try: try: