- Logger doesn't start with log level DEBUG by default, instead reads a environment variable - Secret handler raises exceptions instead of using the module os to exit - Added extensive debug logging - Added detailed function descriptions - Added exponential backoff when parsing the RSS feed
15 lines
368 B
Python
15 lines
368 B
Python
from logger_handler import setup_logger
|
|
|
|
logger = setup_logger(__name__)
|
|
|
|
def return_credentials(path: str)->str:
|
|
try:
|
|
with open (path) as file:
|
|
return file.read().strip()
|
|
except FileNotFoundError:
|
|
logger.fatal(f"[FATAL] Secret file not found: {path}")
|
|
raise
|
|
except Exception as e:
|
|
logger.fatal(f"[FATAL] Failed to read secret file {path}: {e}")
|
|
raise
|