Fix remove directories from slack repo #29

This commit is contained in:
Dimitris Zlatanidis 2015-07-15 10:10:09 +03:00
parent 529ccbe11b
commit 94e02bddfd

View file

@ -24,6 +24,7 @@
import os
import sys
import shutil
from repositories import Repo
from file_size import FileSize
@ -669,6 +670,8 @@ class Initialization(object):
files = "{0}{1}_repo/{2}".format(self.lib_path, repo, f)
if os.path.isfile(files):
os.remove(files)
elif os.path.isdir(files):
shutil.rmtree(files)
except KeyboardInterrupt:
print("")
sys.exit(0)