1
Fork 0

Fixed merge of public and private data

This commit is contained in:
Jake Howard 2015-12-06 16:27:26 +00:00
parent 1bceb5b150
commit 51296fa23d
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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)