From 9f5f5af5f801b725b8c40fda5a44b4cbde3f263c Mon Sep 17 00:00:00 2001 From: myitinos Date: Tue, 23 Jul 2019 19:56:38 +0800 Subject: [PATCH] replace os.system(mkdir) with os.mkdir --- clone.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clone.py b/clone.py index 1ee190f..36c6bb1 100644 --- a/clone.py +++ b/clone.py @@ -16,7 +16,7 @@ class Cloner: def handleDir(self, dirPath: str): backupDirPath = dirPath.replace(self.targetDir, self.backupDir) if not os.path.isdir(backupDirPath): - os.system('mkdir {path}'.format(path=backupDirPath)) + os.mkdir(backupDirPath) with os.scandir(dirPath) as it: for entry in it: if entry.is_dir():