From 542ba1ddac98d2f5fdbdbf0b89e1f074d7f6cde9 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Fri, 12 Jul 2024 12:14:36 +0600 Subject: [PATCH] fix bare except --- bot/__init__.py | 2 +- bot/__main__.py | 2 +- bot/helper/ext_utils/bot_utils.py | 4 ++-- bot/helper/ext_utils/files_utils.py | 12 ++++++------ bot/helper/ext_utils/task_manager.py | 2 +- bot/helper/listeners/aria2_listener.py | 8 ++++---- bot/helper/listeners/tasks_listener.py | 10 +++++----- .../download_utils/direct_link_generator.py | 8 ++++---- .../download_utils/qbit_download.py | 2 +- .../download_utils/telegram_download.py | 2 +- .../download_utils/yt_dlp_download.py | 2 +- bot/helper/mirror_leech_utils/rclone_utils/list.py | 2 +- .../mirror_leech_utils/rclone_utils/transfer.py | 4 ++-- .../mirror_leech_utils/status_utils/direct_status.py | 4 ++-- .../status_utils/extract_status.py | 4 ++-- .../mirror_leech_utils/status_utils/gdrive_status.py | 4 ++-- .../mirror_leech_utils/status_utils/mega_status.py | 2 +- .../status_utils/telegram_status.py | 4 ++-- .../mirror_leech_utils/status_utils/ytdlp_status.py | 2 +- .../mirror_leech_utils/status_utils/zip_status.py | 4 ++-- .../mirror_leech_utils/upload_utils/gdriveTools.py | 6 +++--- .../upload_utils/telegramEngine.py | 6 +++--- bot/helper/telegram_helper/filters.py | 2 +- bot/modules/mirror_leech.py | 4 ++-- bot/modules/torrent_search.py | 4 ++-- bot/modules/torrent_select.py | 4 ++-- bot/modules/users_settings.py | 2 +- bot/modules/ytdlp.py | 6 +++--- update.py | 2 +- 29 files changed, 60 insertions(+), 60 deletions(-) diff --git a/bot/__init__.py b/bot/__init__.py index 4cce9d26d..61805d61b 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -12,7 +12,7 @@ from qbittorrentapi import Client as qbClient from faulthandler import enable as faulthandler_enable from socket import setdefaulttimeout -from logging import getLogger, FileHandler, StreamHandler, INFO, basicConfig, error, info, warning, Formatter, ERROR +from logging import getLogger, FileHandler, StreamHandler, INFO, basicConfig, error, warning, Formatter, ERROR from uvloop import install faulthandler_enable() diff --git a/bot/__main__.py b/bot/__main__.py index 40dd65c49..fd8e80fc0 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -218,7 +218,7 @@ async def restart_notification(): chat_id, msg_id = map(int, f) try: await bot.edit_message_text(chat_id=chat_id, message_id=msg_id, text='Restarted Successfully!') - except: + except Exception: pass await aioremove(".restartmsg") diff --git a/bot/helper/ext_utils/bot_utils.py b/bot/helper/ext_utils/bot_utils.py index 4a764c20e..80ed0063a 100644 --- a/bot/helper/ext_utils/bot_utils.py +++ b/bot/helper/ext_utils/bot_utils.py @@ -214,7 +214,7 @@ def get_readable_message(): if hasattr(download, 'seeders_num'): try: msg += f"\nSeeders: {download.seeders_num()} | Leechers: {download.leechers_num()}" - except: + except Exception: pass elif download.status() == MirrorStatus.STATUS_SEEDING: msg += f"
Size: {download.size()}" @@ -358,7 +358,7 @@ async def get_content_type(url): async with aioClientSession(trust_env=True) as session: async with session.get(url, verify_ssl=False) as response: return response.headers.get('Content-Type') - except: + except Exception: return None diff --git a/bot/helper/ext_utils/files_utils.py b/bot/helper/ext_utils/files_utils.py index 35ea10c62..feec2552c 100644 --- a/bot/helper/ext_utils/files_utils.py +++ b/bot/helper/ext_utils/files_utils.py @@ -233,7 +233,7 @@ async def split_file(path, size, file_, dirpath, split_size, listener, start_tim err = (await listener.suproc.stderr.read()).decode().strip() try: await aioremove(out_path) - except: + except Exception: pass if multi_streams: LOGGER.warning( @@ -396,12 +396,12 @@ async def clean_target(path): if await aiopath.isdir(path): try: await aiormtree(path) - except: + except Exception: pass elif await aiopath.isfile(path): try: await aioremove(path) - except: + except Exception: pass @@ -410,7 +410,7 @@ async def clean_download(path): LOGGER.info(f"Cleaning Download: {path}") try: await aiormtree(path) - except: + except Exception: pass @@ -418,7 +418,7 @@ async def start_cleanup(): xnox_client.torrents_delete(torrent_hashes="all") try: await aiormtree('/usr/src/app/downloads/') - except: + except Exception: pass await makedirs('/usr/src/app/downloads/', exist_ok = True) @@ -428,7 +428,7 @@ def clean_all(): xnox_client.torrents_delete(torrent_hashes="all") try: rmtree('/usr/src/app/downloads/') - except: + except Exception: pass diff --git a/bot/helper/ext_utils/task_manager.py b/bot/helper/ext_utils/task_manager.py index 61e73b0a8..78fa67223 100644 --- a/bot/helper/ext_utils/task_manager.py +++ b/bot/helper/ext_utils/task_manager.py @@ -19,7 +19,7 @@ async def stop_duplicate_check(name, listener): elif listener.extract: try: name = get_base_name(name) - except: + except Exception: name = None if name is not None: telegraph_content, contents_no = await sync_to_async(GoogleDriveHelper().drive_list, name, stopDup=True) diff --git a/bot/helper/listeners/aria2_listener.py b/bot/helper/listeners/aria2_listener.py index 9dddd66c6..f801e7930 100644 --- a/bot/helper/listeners/aria2_listener.py +++ b/bot/helper/listeners/aria2_listener.py @@ -55,7 +55,7 @@ async def __onDownloadStarted(api, gid): elif listener.extract: try: name = get_base_name(name) - except: + except Exception: name = None if name is not None: telegraph_content, contents_no = await sync_to_async(GoogleDriveHelper().drive_list, name, True) @@ -97,7 +97,7 @@ async def __onDownloadStarted(api, gid): async def __onDownloadComplete(api, gid): try: download = await sync_to_async(api.get_download, gid) - except: + except Exception: return if download.options.follow_torrent == 'false': return @@ -145,7 +145,7 @@ async def __onBtDownloadComplete(api, gid): if not file_o.selected and await aiopath.exists(f_path): try: await aioremove(f_path) - except: + except Exception: pass await clean_unwanted(download.dir) if listener.seed: @@ -199,7 +199,7 @@ async def __onDownloadError(api, gid): return error = download.error_message LOGGER.info(f"Download Error: {error}") - except: + except Exception: pass if dl := await getDownloadByGid(gid): listener = dl.listener() diff --git a/bot/helper/listeners/tasks_listener.py b/bot/helper/listeners/tasks_listener.py index 74dac4f52..117ae788e 100644 --- a/bot/helper/listeners/tasks_listener.py +++ b/bot/helper/listeners/tasks_listener.py @@ -65,7 +65,7 @@ async def clean(self): Interval.clear() await sync_to_async(aria2.purge) await delete_all_messages() - except: + except Exception: pass async def onDownloadStart(self): @@ -171,7 +171,7 @@ async def onDownloadComplete(self): del_path = ospath.join(dirpath, file_) try: await aioremove(del_path) - except: + except Exception: return else: if self.seed: @@ -191,7 +191,7 @@ async def onDownloadComplete(self): if not self.seed: try: await aioremove(dl_path) - except: + except Exception: return else: LOGGER.error( @@ -268,12 +268,12 @@ async def onDownloadComplete(self): continue try: await aioremove(f_path) - except: + except Exception: return elif not self.seed or self.newDir: try: await aioremove(f_path) - except: + except Exception: return else: m_size.append(f_size) diff --git a/bot/helper/mirror_leech_utils/download_utils/direct_link_generator.py b/bot/helper/mirror_leech_utils/download_utils/direct_link_generator.py index 897c47183..58bf2c9ca 100644 --- a/bot/helper/mirror_leech_utils/download_utils/direct_link_generator.py +++ b/bot/helper/mirror_leech_utils/download_utils/direct_link_generator.py @@ -585,7 +585,7 @@ def linkBox(url:str): parsed_url = urlparse(url) try: shareToken = parsed_url.path.split('/')[-1] - except: + except Exception: raise DirectDownloadLinkException('ERROR: invalid URL') details = {'contents':[], 'title': '', 'total_size': 0} @@ -783,7 +783,7 @@ def mediafireFolder(url): raw = url.split('/', 4)[-1] folderkey = raw.split('/', 1)[0] folderkey = folderkey.split(',') - except: + except Exception: raise DirectDownloadLinkException('ERROR: Could not parse ') if len(folderkey) == 1: folderkey = folderkey[0] @@ -833,7 +833,7 @@ def __get_info(folderkey): def __scraper(url): try: html = HTML(session.get(url).text) - except: + except Exception: return if final_link := html.xpath("//a[@id='downloadButton']/@href"): return final_link[0] @@ -967,7 +967,7 @@ def __getFile_link(file_id): 'https://send.cm/', data={'op': 'download2', 'id': file_id}, allow_redirects=False) if 'Location' in _res.headers: return _res.headers['Location'] - except: + except Exception: pass def __getFiles(html): diff --git a/bot/helper/mirror_leech_utils/download_utils/qbit_download.py b/bot/helper/mirror_leech_utils/download_utils/qbit_download.py index 338ca066b..99ec6fde0 100644 --- a/bot/helper/mirror_leech_utils/download_utils/qbit_download.py +++ b/bot/helper/mirror_leech_utils/download_utils/qbit_download.py @@ -66,7 +66,7 @@ async def add_qb_torrent(link, path, listener, ratio, seed_time): if tor_info.state not in ["metaDL", "checkingResumeData", "pausedDL"]: await deleteMessage(meta) break - except: + except Exception: await deleteMessage(meta) return diff --git a/bot/helper/mirror_leech_utils/download_utils/telegram_download.py b/bot/helper/mirror_leech_utils/download_utils/telegram_download.py index d3fb6aa5c..998247c76 100644 --- a/bot/helper/mirror_leech_utils/download_utils/telegram_download.py +++ b/bot/helper/mirror_leech_utils/download_utils/telegram_download.py @@ -62,7 +62,7 @@ async def __onDownloadError(self, error): async with global_lock: try: GLOBAL_GID.remove(self.__id) - except: + except Exception: pass await self.__listener.onDownloadError(error) diff --git a/bot/helper/mirror_leech_utils/download_utils/yt_dlp_download.py b/bot/helper/mirror_leech_utils/download_utils/yt_dlp_download.py index 114da04ea..2f6b0a1a6 100644 --- a/bot/helper/mirror_leech_utils/download_utils/yt_dlp_download.py +++ b/bot/helper/mirror_leech_utils/download_utils/yt_dlp_download.py @@ -114,7 +114,7 @@ def __onDownloadProgress(self, d): self.__eta = d.get('eta', '-') or '-' try: self.__progress = (self.__downloaded_bytes / self.__size) * 100 - except: + except Exception: pass async def __onDownloadStart(self, from_queue=False): diff --git a/bot/helper/mirror_leech_utils/rclone_utils/list.py b/bot/helper/mirror_leech_utils/rclone_utils/list.py index 1f29abfbe..cf8f256b5 100644 --- a/bot/helper/mirror_leech_utils/rclone_utils/list.py +++ b/bot/helper/mirror_leech_utils/rclone_utils/list.py @@ -120,7 +120,7 @@ async def __event_handler(self): pfunc, filters=regex('^rcq') & user(self.__user_id)), group=-1) try: await wait_for(self.event.wait(), timeout=self.__timeout) - except: + except Exception: self.path = '' self.remote = 'Timed Out. Task has been cancelled!' self.is_cancelled = True diff --git a/bot/helper/mirror_leech_utils/rclone_utils/transfer.py b/bot/helper/mirror_leech_utils/rclone_utils/transfer.py index 3f2b125f2..b8890ecea 100644 --- a/bot/helper/mirror_leech_utils/rclone_utils/transfer.py +++ b/bot/helper/mirror_leech_utils/rclone_utils/transfer.py @@ -57,7 +57,7 @@ async def __progress(self): while not (self.__proc is None or self.__is_cancelled): try: data = (await self.__proc.stdout.readline()).decode() - except: + except Exception: continue if not data: break @@ -379,7 +379,7 @@ async def cancel_download(self): if self.__proc is not None: try: self.__proc.kill() - except: + except Exception: pass if self.__is_download: LOGGER.info(f"Cancelling Download: {self.name}") diff --git a/bot/helper/mirror_leech_utils/status_utils/direct_status.py b/bot/helper/mirror_leech_utils/status_utils/direct_status.py index 25c5ccd21..c905541ae 100644 --- a/bot/helper/mirror_leech_utils/status_utils/direct_status.py +++ b/bot/helper/mirror_leech_utils/status_utils/direct_status.py @@ -13,7 +13,7 @@ def gid(self): def progress_raw(self): try: return self.__obj.processed_bytes / self.__obj.total_size * 100 - except: + except Exception: return 0 def progress(self): @@ -32,7 +32,7 @@ def eta(self): try: seconds = (self.__obj.total_size - self.__obj.processed_bytes) / self.__obj.speed return get_readable_time(seconds) - except: + except Exception: return '-' def status(self): diff --git a/bot/helper/mirror_leech_utils/status_utils/extract_status.py b/bot/helper/mirror_leech_utils/status_utils/extract_status.py index 8061aed7f..e31da1661 100644 --- a/bot/helper/mirror_leech_utils/status_utils/extract_status.py +++ b/bot/helper/mirror_leech_utils/status_utils/extract_status.py @@ -24,7 +24,7 @@ def speed_raw(self): def progress_raw(self): try: return self.processed_raw() / self.__size * 100 - except: + except Exception: return 0 def progress(self): @@ -43,7 +43,7 @@ def eta(self): try: seconds = (self.__size - self.processed_raw()) / self.speed_raw() return get_readable_time(seconds) - except: + except Exception: return '-' def status(self): diff --git a/bot/helper/mirror_leech_utils/status_utils/gdrive_status.py b/bot/helper/mirror_leech_utils/status_utils/gdrive_status.py index 11978691e..970495736 100644 --- a/bot/helper/mirror_leech_utils/status_utils/gdrive_status.py +++ b/bot/helper/mirror_leech_utils/status_utils/gdrive_status.py @@ -33,7 +33,7 @@ def gid(self) -> str: def progress_raw(self): try: return self.__obj.processed_bytes / self.__size * 100 - except: + except Exception: return 0 def progress(self): @@ -47,7 +47,7 @@ def eta(self): seconds = (self.__size - self.__obj.processed_bytes) / \ self.__obj.speed return get_readable_time(seconds) - except: + except Exception: return '-' def download(self): diff --git a/bot/helper/mirror_leech_utils/status_utils/mega_status.py b/bot/helper/mirror_leech_utils/status_utils/mega_status.py index 07e79ba5f..4b36d071e 100644 --- a/bot/helper/mirror_leech_utils/status_utils/mega_status.py +++ b/bot/helper/mirror_leech_utils/status_utils/mega_status.py @@ -16,7 +16,7 @@ def name(self): def progress_raw(self): try: return round(self.__obj.downloaded_bytes / self.__size * 100, 2) - except: + except Exception: return 0.0 def progress(self): diff --git a/bot/helper/mirror_leech_utils/status_utils/telegram_status.py b/bot/helper/mirror_leech_utils/status_utils/telegram_status.py index 9f3b84b0b..ef0582199 100644 --- a/bot/helper/mirror_leech_utils/status_utils/telegram_status.py +++ b/bot/helper/mirror_leech_utils/status_utils/telegram_status.py @@ -28,7 +28,7 @@ def name(self): def progress(self): try: progress_raw = self.__obj.processed_bytes / self.__size * 100 - except: + except Exception: progress_raw = 0 return f'{round(progress_raw, 2)}%' @@ -40,7 +40,7 @@ def eta(self): seconds = (self.__size - self.__obj.processed_bytes) / \ self.__obj.speed return get_readable_time(seconds) - except: + except Exception: return '-' def gid(self) -> str: diff --git a/bot/helper/mirror_leech_utils/status_utils/ytdlp_status.py b/bot/helper/mirror_leech_utils/status_utils/ytdlp_status.py index e15931ea3..8211fedff 100644 --- a/bot/helper/mirror_leech_utils/status_utils/ytdlp_status.py +++ b/bot/helper/mirror_leech_utils/status_utils/ytdlp_status.py @@ -43,7 +43,7 @@ def eta(self): seconds = (self.__obj.size - self.processed_raw()) / \ self.__obj.download_speed return get_readable_time(seconds) - except: + except Exception: return '-' def download(self): diff --git a/bot/helper/mirror_leech_utils/status_utils/zip_status.py b/bot/helper/mirror_leech_utils/status_utils/zip_status.py index 1cf7f380c..5e5edc296 100644 --- a/bot/helper/mirror_leech_utils/status_utils/zip_status.py +++ b/bot/helper/mirror_leech_utils/status_utils/zip_status.py @@ -24,7 +24,7 @@ def speed_raw(self): def progress_raw(self): try: return self.processed_raw() / self.__size * 100 - except: + except Exception: return 0 def progress(self): @@ -43,7 +43,7 @@ def eta(self): try: seconds = (self.__size - self.processed_raw()) / self.speed_raw() return get_readable_time(seconds) - except: + except Exception: return '-' def status(self): diff --git a/bot/helper/mirror_leech_utils/upload_utils/gdriveTools.py b/bot/helper/mirror_leech_utils/upload_utils/gdriveTools.py index c3dd78fa8..0abcb61f6 100644 --- a/bot/helper/mirror_leech_utils/upload_utils/gdriveTools.py +++ b/bot/helper/mirror_leech_utils/upload_utils/gdriveTools.py @@ -58,7 +58,7 @@ def __init__(self, name=None, path=None, listener=None): def speed(self): try: return self.__processed_bytes / self.__total_time - except: + except Exception: return 0 @property @@ -123,7 +123,7 @@ def getFolderData(self, file_id): meta = self.__service.files().get(fileId=file_id, supportsAllDrives=True).execute() if meta.get('mimeType', '') == self.__G_DRIVE_DIR_MIME_TYPE: return meta.get('name') - except: + except Exception: return @retry(wait=wait_exponential(multiplier=2, min=3, max=6), stop=stop_after_attempt(3), @@ -325,7 +325,7 @@ def __upload_file(self, file_path, file_name, mime_type, dest_id, is_dir=True): if not self.__listener.seed or self.__listener.newDir: try: osremove(file_path) - except: + except Exception: pass self.__file_processed_bytes = 0 if not is_dir: diff --git a/bot/helper/mirror_leech_utils/upload_utils/telegramEngine.py b/bot/helper/mirror_leech_utils/upload_utils/telegramEngine.py index f975923e2..9cf849f48 100644 --- a/bot/helper/mirror_leech_utils/upload_utils/telegramEngine.py +++ b/bot/helper/mirror_leech_utils/upload_utils/telegramEngine.py @@ -385,7 +385,7 @@ async def __upload_file(self, cap_mono, file, force_document=False): try: self.__sent_msg = await bot.copy_message(nrml_media.chat.id, nrml_media.chat.id, nrml_media.id, reply_to_message_id=self.__sent_msg.id, reply_markup=buttons) if self.__sent_msg: await deleteMessage(nrml_media) - except: + except Exception: self.__sent_msg = nrml_media else: self.__sent_msg = nrml_media @@ -431,7 +431,7 @@ async def __upload_file(self, cap_mono, file, force_document=False): try: self.__sent_msg = await bot.copy_message(nrml_media.chat.id, nrml_media.chat.id, nrml_media.id, reply_to_message_id=self.__sent_msg.id, reply_markup=buttons) if self.__sent_msg: await deleteMessage(nrml_media) - except: + except Exception: self.__sent_msg = nrml_media else: self.__sent_msg = nrml_media @@ -496,7 +496,7 @@ async def __upload_file(self, cap_mono, file, force_document=False): def speed(self): try: return self.__processed_bytes / (time() - self.__start_time) - except: + except Exception: return 0 @property diff --git a/bot/helper/telegram_helper/filters.py b/bot/helper/telegram_helper/filters.py index b1526fe47..e438808f1 100644 --- a/bot/helper/telegram_helper/filters.py +++ b/bot/helper/telegram_helper/filters.py @@ -36,7 +36,7 @@ async def authorized_usetting(self, _, message): if await (await chat_info(str(channel_id))).get_member(uid): isExists = True break - except: + except Exception: continue return isExists diff --git a/bot/modules/mirror_leech.py b/bot/modules/mirror_leech.py index e2c3b34de..4dba8d7bc 100644 --- a/bot/modules/mirror_leech.py +++ b/bot/modules/mirror_leech.py @@ -131,7 +131,7 @@ async def _mirror_leech(client, message, isQbit=False, isLeech=False, sameDir=No bulk = await extract_bulk_links(message, bulk_start, bulk_end) if len(bulk) == 0: raise ValueError('Bulk Empty!') - except: + except Exception: await sendMessage(message, 'Reply to text file or tg message that have links seperated by new line!') return b_msg = input_list[:1] @@ -176,7 +176,7 @@ async def __run_multi(): message.from_user = await client.get_users(id_) try: await message.unpin() - except: + except Exception: pass elif sender_chat := message.sender_chat: tag = sender_chat.title diff --git a/bot/modules/torrent_search.py b/bot/modules/torrent_search.py index 493983a04..ee711f8f4 100644 --- a/bot/modules/torrent_search.py +++ b/bot/modules/torrent_search.py @@ -131,7 +131,7 @@ async def __getResult(search_results, key, message, method): msg += f"Size: {result['size']}
" try: msg += f"Seeders: {result['seeders']} | Leechers: {result['leechers']}
" - except: + except Exception: pass if 'torrent' in result.keys(): msg += f"Direct Link

" @@ -140,7 +140,7 @@ async def __getResult(search_results, key, message, method): msg += f"Telegram

" else: msg += '
' - except: + except Exception: continue else: msg += f"{escape(result.fileName)}
" diff --git a/bot/modules/torrent_select.py b/bot/modules/torrent_select.py index 483b1aea6..ca10e9a77 100644 --- a/bot/modules/torrent_select.py +++ b/bot/modules/torrent_select.py @@ -60,7 +60,7 @@ async def handle_torrent_done(torrent_hash, download): if await aiopath.exists(file_path): try: await aioremove(file_path) - except: + except Exception: pass if not download.queued: @@ -73,7 +73,7 @@ async def handle_aria2_done(gid, download): if file['selected'] == 'false' and await aiopath.exists(file['path']): try: await aioremove(file['path']) - except: + except Exception: pass if not download.queued: diff --git a/bot/modules/users_settings.py b/bot/modules/users_settings.py index 0d4bc2a5a..86248d028 100644 --- a/bot/modules/users_settings.py +++ b/bot/modules/users_settings.py @@ -321,7 +321,7 @@ async def edit_user_settings(client, query): try: await sendCustomMsg(user_id, msg) await query.answer('User TDs Successfully Send in your PM', show_alert=True) - except: + except Exception: await query.answer('Start the Bot in PM (Private) and Try Again', show_alert=True) await update_user_settings(query, 'user_tds', 'mirror') elif data[2] == "dthumb": diff --git a/bot/modules/ytdlp.py b/bot/modules/ytdlp.py index a08f5686e..925076bf8 100644 --- a/bot/modules/ytdlp.py +++ b/bot/modules/ytdlp.py @@ -82,7 +82,7 @@ async def __event_handler(self): pfunc, filters=regex('^ytq') & user(self.__user_id)), group=-1) try: await wait_for(self.event.wait(), timeout=self.__timeout) - except: + except Exception: await editMessage(self.__reply_to, 'Timed Out. Task has been cancelled!') self.qual = None self.is_cancelled = True @@ -301,7 +301,7 @@ async def _ytdl(client, message, isLeech=False, sameDir=None, bulk=[]): bulk = await extract_bulk_links(message, bulk_start, bulk_end) if len(bulk) == 0: raise ValueError('Bulk Empty!') - except: + except Exception: await sendMessage(message, 'Reply to text file or tg message that have links seperated by new line!') return b_msg = input_list[:1] @@ -344,7 +344,7 @@ async def __run_multi(): message.from_user = await client.get_users(id_) try: await message.unpin() - except: + except Exception: pass user_id = message.from_user.id diff --git a/update.py b/update.py index 2f280309e..f26ecd838 100644 --- a/update.py +++ b/update.py @@ -39,7 +39,7 @@ def format(self, record): error(f"Failed to download config.env {res.status_code}") except Exception as e: error(f"CONFIG_FILE_URL: {e}") -except: +except Exception: pass load_dotenv('config.env', override=True)