Ubuntu Pastebin

Paste from muktupavels at Fri, 25 Nov 2016 13:15:15 +0000

Download as text
1
2
3
4
5
-    if not os.path.exists(target_path):
-        os.makedirs(target_path)
+    if not os.path.exists(target_path) or not os.listdir(target_path):
+        if not os.path.exists(target_path):
+            os.makedirs(target_path)
Download as text