We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01a8064 commit 2e3d3bfCopy full SHA for 2e3d3bf
1 file changed
release.py
@@ -1,4 +1,5 @@
1
import os
2
+import shutil
3
import requests
4
import zipfile
5
@@ -17,6 +18,9 @@
17
18
f.write(chunk)
19
20
z = zipfile.ZipFile("web.zip")
- z.extractall(os.path.join(BASE_DIR, "requestbin", "web"))
21
+ path = os.path.join(BASE_DIR, "requestbin", "web")
22
+ if os.path.exists(path) and os.path.isdir(path):
23
+ shutil.rmtree(path)
24
+ z.extractall(path)
25
26
os.remove("web.zip")
0 commit comments