aboutsummaryrefslogtreecommitdiffstats
path: root/bot/utils/persist.py
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-03-21 15:34:58 +0100
committerGravatar kwzrd <[email protected]>2020-03-21 15:36:35 +0100
commit5d700cf3b4fabe69010f3e483da7ec1448fde132 (patch)
tree5637306a72a1d23cd75764a633d5e883da63b26b /bot/utils/persist.py
parentMerge master into seasonal-purge (diff)
Deseasonify: improve `get_seasons` convenience function
Diffstat (limited to 'bot/utils/persist.py')
-rw-r--r--bot/utils/persist.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/utils/persist.py b/bot/utils/persist.py
index 3539375a..e5db4d5d 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.seasons import get_seasons
+from bot.seasons import get_season_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_seasons() if s in file_path.parts), None)
+ season = next((s for s in get_season_names() if s in file_path.parts), None)
if season:
# make sure subdirectory exists first