diff options
| author | Debulois Quentin <quentin.debulois@gmail.com> | 2020-09-18 17:14:29 +0200 |
|---|---|---|
| committer | Debulois Quentin <quentin.debulois@gmail.com> | 2020-09-18 17:14:29 +0200 |
| commit | dd8d8cbdd2394a487e9dc4badf8798d2b9df374a (patch) | |
| tree | 42d6e2b9026bce7da476300204fc74fc262522a1 /Redim/config.py | |
| parent | 1f04346cae63d14e47c2c4dfe6721b28a1e45211 (diff) | |
Travail sur la POO, pas de rajout, juste du paufinage.
Diffstat (limited to 'Redim/config.py')
| -rw-r--r-- | Redim/config.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Redim/config.py b/Redim/config.py index 4bfa31a..de03ead 100644 --- a/Redim/config.py +++ b/Redim/config.py @@ -1,6 +1,8 @@ import json -from os import mkdir -from os.path import isdir, join +from time import time +from shutil import rmtree +from os import mkdir, listdir, environ +from os.path import isdir, join, getmtime class Config(): @@ -14,3 +16,8 @@ class Config(): with open(join(json_path, "config_redim"), "r") as f: configuration = json.load(f) return configuration + + def nettoyage_pyinstaller(self): + for i in listdir(environ["TMP"]): + if i.startswith("_MEI") and isdir(i) and (int(getmtime(join(environ["TMP"], i))) < (time() - 86400)): + rmtree(join(environ["TMP"], i)) |
