Remove enc_path if it exists
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
parent
fb16a97bcf
commit
0391609c77
1 changed files with 3 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
||||||
# Imports
|
# Imports
|
||||||
from git import Repo
|
from git import Repo
|
||||||
import os
|
import os
|
||||||
from shutil import copytree
|
from shutil import copytree, rmtree
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from glob import glob
|
from glob import glob
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -36,6 +36,8 @@ enc_key = os.environ.get("ENCRYPTION_KEY")
|
||||||
|
|
||||||
# Create our encrypted directory base
|
# Create our encrypted directory base
|
||||||
current_time = str(int(time()))
|
current_time = str(int(time()))
|
||||||
|
if os.path.exists(enc_path):
|
||||||
|
rmtree(enc_path)
|
||||||
os.mkdir(enc_path)
|
os.mkdir(enc_path)
|
||||||
os.chdir(enc_path)
|
os.chdir(enc_path)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue