diff --git a/CHANGELOG.md b/CHANGELOG.md index f358342..e62f349 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## v0.5.24 + +* Eliminate overwrite error in cli + +## v0.5.23 + +* Fix cli initial pull in empty workspace +* Fix cli default to CACHE_TOKENS = True + ## v0.5.22 (2020-10-13) * Add events handling to widgets with nested iframes diff --git a/presalytics/cli.py b/presalytics/cli.py index 6639ab5..815b6bb 100644 --- a/presalytics/cli.py +++ b/presalytics/cli.py @@ -371,6 +371,8 @@ def main(): #load story outline from file if config: set_dict = {} if not args.set else parse_vars(args.set) + if 'CACHE_TOKENS' not in set_dict.keys(): + set_dict['CACHE_TOKENS'] = True presalytics.lib.tools.workflows.create_config_file(args.username, password=args.password, set_dict=set_dict, @@ -385,8 +387,14 @@ def main(): if os.path.exists(abs_filename): filename = abs_filename else: - logger.error("Could not find file: {}".format(filename)) - return + if pull and args.id: + outline = presalytics.lib.tools.workflows.pull_outline(args.id, username=args.username, password=args.password) + _dump(outline, filename, args.overwrite, args.json) + pull = False + write = False + else: + logger.error("Could not find file: {}".format(filename)) + return outline = _load_file(filename) except Exception: logger.error("Error handling file: {}".format(filename)) diff --git a/setup.py b/setup.py index f25fd39..26bcf07 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "presalytics" -VERSION = "0.5.22" +VERSION = "0.5.24" # To install the library, run the following #