From 252b0d747e36a0683bd260b517554569217f09df Mon Sep 17 00:00:00 2001 From: ismail yenigul Date: Thu, 16 Apr 2020 12:59:22 +0300 Subject: [PATCH] use os.makedirs instead of mkdir os.makedirs to create backup directory recursively --- dbbackup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbbackup.py b/dbbackup.py index ce18ce7..e600dbb 100644 --- a/dbbackup.py +++ b/dbbackup.py @@ -39,7 +39,8 @@ try: os.stat(TODAYBACKUPPATH) except: - os.mkdir(TODAYBACKUPPATH) + os.makedirs(TODAYBACKUPPATH) + # makedirs recursive directory creation like mkdir(), but makes all intermediate-level directories needed to contain the leaf directory. # Code for checking if you want to take single database backup or assinged multiple backups in DB_NAME. print ("checking for databases names file.")