Fix utils.copy behaviour

Previously, the copy util failed if only a directory containing only
files was specified in THEME_STATIC_PATHS
This commit is contained in:
bmcorser 2013-09-14 16:18:53 +01:00
commit e03cf3f517
2 changed files with 18 additions and 0 deletions

View file

@ -273,6 +273,9 @@ def copy(path, source, destination, destination_path=None):
destination_ = os.path.abspath(
os.path.expanduser(os.path.join(destination, destination_path)))
if not os.path.exists(destination_):
os.makedirs(destination_)
def recurse(source, destination):
for entry in os.listdir(source):
entry_path = os.path.join(source, entry)