From 51296fa23d6ba80729a505f6c3c54446ecf8acb5 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 6 Dec 2015 16:27:26 +0000 Subject: [PATCH] Fixed merge of public and private data --- project/sync/cli.py | 3 ++- project/utils/repos.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/project/sync/cli.py b/project/sync/cli.py index fd97c65..253e1c6 100644 --- a/project/sync/cli.py +++ b/project/sync/cli.py @@ -12,5 +12,6 @@ def cli(private): if private and exit_code == 0: if not config.get('private_repo'): print("private repo not set") - exit_code = repos.clone_public_data() + return 1 + exit_code = repos.clone_private_data() return exit_code diff --git a/project/utils/repos.py b/project/utils/repos.py index d7523d1..4757658 100644 --- a/project/utils/repos.py +++ b/project/utils/repos.py @@ -1,4 +1,5 @@ import os, shutil +from distutils.dir_util import copy_tree from . import config, constants @@ -29,14 +30,13 @@ def clone_private_data(): if exit_code != 0: return exit_code - shutil.copytree( + copy_tree( constants.PRIVATE_DATA_DIR, constants.PUBLIC_DATA_DIR ) return exit_code - def has_data(data): public_path = os.path.join(constants.PUBLIC_DATA_DIR, data) private_path = os.path.join(constants.PRIVATE_DATA_DIR, data)