Revert logging level to INFO and remove debug code

This commit is contained in:
ChuckBuilds
2025-04-17 09:58:24 -05:00
parent 22f21093f2
commit 866a1f9901
2 changed files with 1 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ from src.stock_manager import StockManager
from src.stock_news_manager import StockNewsManager
# Configure logging
logging.basicConfig(level=logging.DEBUG, force=True)
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
class DisplayController:

View File

@@ -58,15 +58,9 @@ class StockManager:
# Directory exists, check if writable by trying to create a temp file
try:
temp_file_path = os.path.join(self.logo_dir, "write_test_py.tmp")
abs_path = os.path.abspath(temp_file_path)
cwd = os.getcwd()
euid = os.geteuid()
egid = os.getegid()
logger.debug(f"Write test: UID={euid}, GID={egid}, CWD='{cwd}', Path='{abs_path}'")
with open(temp_file_path, 'w') as f:
f.write('test')
os.remove(temp_file_path)
logger.debug(f"Write test successful in {self.logo_dir}")
writable = True
except (PermissionError, OSError) as e:
logger.warning(f"Cannot write to logo directory '{self.logo_dir}' (write test failed): {e}. Using temporary directory.")