From d89a60d018bc470bb2d970e5a6b0d0044438cdc5 Mon Sep 17 00:00:00 2001 From: kwzrd Date: Sat, 28 Mar 2020 15:24:43 +0100 Subject: Deseasonify: rename utility function To avoid confusion, the packages should no longer be referred to as 'seasons'. --- bot/utils/persist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bot/utils/persist.py') diff --git a/bot/utils/persist.py b/bot/utils/persist.py index 6f6507fa..d78e5420 100644 --- a/bot/utils/persist.py +++ b/bot/utils/persist.py @@ -2,7 +2,7 @@ import sqlite3 from pathlib import Path from shutil import copyfile -from bot.exts import get_season_names +from bot.exts import get_package_names DIRECTORY = Path("data") # directory that has a persistent volume mapped to it @@ -41,7 +41,7 @@ def make_persistent(file_path: Path) -> Path: raise OSError(f"File not found at {file_path}.") # detect season in datafile path for assigning to subdirectory - season = next((s for s in get_season_names() if s in file_path.parts), None) + season = next((s for s in get_package_names() if s in file_path.parts), None) if season: # make sure subdirectory exists first -- cgit v1.2.3