diff --git a/call_handler.py b/call_handler.py index 2476cda..aeb066d 100644 --- a/call_handler.py +++ b/call_handler.py @@ -348,7 +348,11 @@ class CallHandler: with wave.open(filename, "rb") as wav_file: return wav_file.getnframes() / wav_file.getframerate() - directory = f"/var/spool/asterisk/monitor/{datetime.now().year}/{datetime.now().month}/{datetime.now().day}" + mounth = f"{datetime.now().month:02d}" + day = f"{datetime.now().day:02d}" + directory = ( + f"/var/spool/asterisk/monitor/{datetime.now().year}/{mounth}/{day}" + ) tree = {} if config.DEBUG: logging.info(f"Scanning directory: {directory}")