Fixed merge of public and private data
This commit is contained in:
parent
1bceb5b150
commit
51296fa23d
2 changed files with 4 additions and 3 deletions
|
@ -12,5 +12,6 @@ def cli(private):
|
||||||
if private and exit_code == 0:
|
if private and exit_code == 0:
|
||||||
if not config.get('private_repo'):
|
if not config.get('private_repo'):
|
||||||
print("private repo not set")
|
print("private repo not set")
|
||||||
exit_code = repos.clone_public_data()
|
return 1
|
||||||
|
exit_code = repos.clone_private_data()
|
||||||
return exit_code
|
return exit_code
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import os, shutil
|
import os, shutil
|
||||||
|
from distutils.dir_util import copy_tree
|
||||||
from . import config, constants
|
from . import config, constants
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,14 +30,13 @@ def clone_private_data():
|
||||||
if exit_code != 0:
|
if exit_code != 0:
|
||||||
return exit_code
|
return exit_code
|
||||||
|
|
||||||
shutil.copytree(
|
copy_tree(
|
||||||
constants.PRIVATE_DATA_DIR,
|
constants.PRIVATE_DATA_DIR,
|
||||||
constants.PUBLIC_DATA_DIR
|
constants.PUBLIC_DATA_DIR
|
||||||
)
|
)
|
||||||
return exit_code
|
return exit_code
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def has_data(data):
|
def has_data(data):
|
||||||
public_path = os.path.join(constants.PUBLIC_DATA_DIR, data)
|
public_path = os.path.join(constants.PUBLIC_DATA_DIR, data)
|
||||||
private_path = os.path.join(constants.PRIVATE_DATA_DIR, data)
|
private_path = os.path.join(constants.PRIVATE_DATA_DIR, data)
|
||||||
|
|
Reference in a new issue