Fix unbounded variables
This commit is contained in:
parent
fd1e5df655
commit
1ee4ca8eb8
1 changed files with 7 additions and 7 deletions
|
@ -19,15 +19,15 @@ async def get_timefile_exact(time) -> str:
|
|||
time is of type `datetime`; it is not "rounded" to match the real file;
|
||||
that work is done in get_timefile(time)
|
||||
"""
|
||||
remote_repo = get_config()["AUDIO_INPUT"]
|
||||
remote_path = os.path.join(
|
||||
remote_repo, time.strftime(get_config()["AUDIO_INPUT_FORMAT"])
|
||||
repo = get_config()["AUDIO_INPUT"]
|
||||
path = os.path.join(
|
||||
repo, time.strftime(get_config()["AUDIO_INPUT_FORMAT"])
|
||||
)
|
||||
if remote_path.startswith("http://") or remote_path.startswith("https://"):
|
||||
logger.info(f"downloading: {remote_path}")
|
||||
local = await download(remote_path)
|
||||
if path.startswith("http://") or path.startswith("https://"):
|
||||
logger.info(f"downloading: {path}")
|
||||
local = await download(path)
|
||||
return local
|
||||
return local_path
|
||||
return path
|
||||
|
||||
|
||||
def round_timefile(exact: datetime) -> datetime:
|
||||
|
|
Loading…
Reference in a new issue