aboutsummaryrefslogtreecommitdiffstats
path: root/bot/utils/__init__.py
diff options
context:
space:
mode:
authorGravatar scragly <[email protected]>2019-09-23 16:12:18 +1000
committerGravatar scragly <[email protected]>2019-09-23 16:12:18 +1000
commitc1b8b23e4a327631f287b1dc68ab76967651e57e (patch)
tree4abcd93637db6bc19d23dcdc8c2a96e49005a881 /bot/utils/__init__.py
parentCheck explicitly if file exists rather than any existing path. (diff)
Improve func name, example, directory management
Function name has been changed to `make_persistent` after prompt by @lemonsaurus asking for a more descriptive name. Thanks @MarkKoz for providing the alternate name. During local testing, the `data` directory doesn't exist yet. In prod, this isn't an issue as the persistent volume is mounted at that location. To make local testing more convenient, the directory is checked and made if not found. Persistent data files will be placed in a seasonal subdirectory so long as they have a valid season name somewhere in their path, otherwise they will be placed directly in the data directory. Added a note to docstring to avoid same-named files in the same seasons or it will conflict with each other in the persistent data directory. The example was extended a little bit to make it both actually valid if tested and hopefully make it easier to understand what's going on.
Diffstat (limited to 'bot/utils/__init__.py')
0 files changed, 0 insertions, 0 deletions