aboutsummaryrefslogtreecommitdiffstats
path: root/cogs/utils/temp.py
diff options
context:
space:
mode:
authorsalmonik <salmonik@noreply.codeberg.org>2026-04-19 18:10:09 +0200
committersalmonik <salmonik@noreply.codeberg.org>2026-04-19 18:10:09 +0200
commitf8e1cf36e1efa0602bf2e450835f2a67654762a6 (patch)
treefe6b12226d7eebe2a0dc6525de3414d0c3718cc8 /cogs/utils/temp.py
parentadd support for x^2+y^2=0,4 and alike (diff)
parentfix: proper aiohttp async context manager mocking in test (diff)
downloadsenator-sperma-f8e1cf36e1efa0602bf2e450835f2a67654762a6.tar.gz
senator-sperma-f8e1cf36e1efa0602bf2e450835f2a67654762a6.zip
Merge pull request 'massive changes' (#3) from dev into main
Reviewed-on: https://codeberg.org/salmonik/senator-sperma/pulls/3 stable enough
Diffstat (limited to 'cogs/utils/temp.py')
-rw-r--r--cogs/utils/temp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cogs/utils/temp.py b/cogs/utils/temp.py
index 528d6a3..0b2c8d7 100644
--- a/cogs/utils/temp.py
+++ b/cogs/utils/temp.py
@@ -8,11 +8,11 @@ import tempfile
8 8
9def get_temp_dir(subdir: str = "senator_sperma") -> str: 9def get_temp_dir(subdir: str = "senator_sperma") -> str:
10 """Get or create a temp subdirectory. 10 """Get or create a temp subdirectory.
11 11
12 Uses system temp directory (/tmp on Linux, %TEMP% on Windows). 12 Uses system temp directory (/tmp on Linux, %TEMP% on Windows).
13 OS handles cleanup automatically. 13 OS handles cleanup automatically.
14 """ 14 """
15 base_temp = tempfile.gettempdir() 15 base_temp = tempfile.gettempdir()
16 temp_path = os.path.join(base_temp, subdir) 16 temp_path = os.path.join(base_temp, subdir)
17 os.makedirs(temp_path, exist_ok=True) 17 os.makedirs(temp_path, exist_ok=True)
18 return temp_path \ No newline at end of file 18 return temp_path