From 7b8e6f1657c9ef5fe3f0496708b5b04abdb2b614 Mon Sep 17 00:00:00 2001 From: Kieran Wood Date: Fri, 21 Nov 2025 13:37:57 -0700 Subject: [PATCH] Added gemini-code-assist suggestions --- backend/endpoints/sockets/scan.py | 3 ++- backend/exceptions/fs_exceptions.py | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/backend/endpoints/sockets/scan.py b/backend/endpoints/sockets/scan.py index b2c033716..5113b28a2 100644 --- a/backend/endpoints/sockets/scan.py +++ b/backend/endpoints/sockets/scan.py @@ -18,6 +18,7 @@ from exceptions.fs_exceptions import ( FirmwareNotFoundException, FolderStructureNotMatchException, RomsNotFoundException, + FOLDER_STRUCT_MSG ) from exceptions.socket_exceptions import ScanStoppedException from handler.database import db_firmware_handler, db_platform_handler, db_rom_handler @@ -644,7 +645,7 @@ async def scan_platforms( if len(platform_list) == 0: log.warning( f"{hl(emoji.EMOJI_WARNING, color=LIGHTYELLOW)} No platforms found, verify that the folder structure is right and the volume is mounted correctly." - "Check https://docs.romm.app/latest/Getting-Started/Folder-Structure/ for more details." + f"{FOLDER_STRUCT_MSG}" ) else: log.info( diff --git a/backend/exceptions/fs_exceptions.py b/backend/exceptions/fs_exceptions.py index 21b086620..a916562dd 100644 --- a/backend/exceptions/fs_exceptions.py +++ b/backend/exceptions/fs_exceptions.py @@ -1,12 +1,12 @@ from logger.formatter import BLUE from logger.formatter import highlight as hl -folder_struct_msg = "Check RomM folder structure here: https://docs.romm.app/latest/Getting-Started/Folder-Structure/" +FOLDER_STRUCT_MSG = "Check RomM folder structure here: https://docs.romm.app/latest/Getting-Started/Folder-Structure/ for more details" class FolderStructureNotMatchException(Exception): def __init__(self): - self.message = f"Platforms not found. {folder_struct_msg}" + self.message = f"Platforms not found. {FOLDER_STRUCT_MSG }" super().__init__(self.message) def __repr__(self) -> str: @@ -33,7 +33,7 @@ class PlatformAlreadyExistsException(Exception): class RomsNotFoundException(Exception): def __init__(self, platform: str): - self.message = f"Roms not found for platform {hl(platform, color=BLUE)}. {folder_struct_msg}" + self.message = f"Roms not found for platform {hl(platform, color=BLUE)}. {FOLDER_STRUCT_MSG }" super().__init__(self.message) def __repr__(self): @@ -51,7 +51,7 @@ class RomAlreadyExistsException(Exception): class FirmwareNotFoundException(Exception): def __init__(self, platform: str): - self.message = f"Firmware not found for platform {hl(platform, color=BLUE)}. {folder_struct_msg}" + self.message = f"Firmware not found for platform {hl(platform, color=BLUE)}. {FOLDER_STRUCT_MSG }" super().__init__(self.message) def __repr__(self):