From 7025f028c9196057839bf14d3900a48ec4d77df7 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 4 Dec 2015 08:50:30 +0000 Subject: [PATCH] Added check for basics to sync CLI --- project/sync/cli.py | 7 +++++-- project/utils/repos.py | 8 -------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/project/sync/cli.py b/project/sync/cli.py index 679d68e..65fbdf1 100644 --- a/project/sync/cli.py +++ b/project/sync/cli.py @@ -1,6 +1,9 @@ import click - +from project.utils import config, constants @click.command('sync') def cli(): - pass + if not config.has_basics(): + print("You do not have all the basic requirements set.") + return 1 + diff --git a/project/utils/repos.py b/project/utils/repos.py index 04263b8..9bddc7d 100644 --- a/project/utils/repos.py +++ b/project/utils/repos.py @@ -6,14 +6,6 @@ def has_repo_cloned(): return os.path.isdir('./data') -def has_required_config_set(): - REQUIRED_KEYS = ['public_repo'] - for key in REQUIRED_KEYS: - if not config.get(key): - return False - return True - - def clone_public_data(): exit_code = 0 exit_code = os.system("git clone -b master --single-branch {} data"