From 8f93d499c9cec20de4846d296517343ab1d11efd Mon Sep 17 00:00:00 2001 From: Shane <6071159+smashedr@users.noreply.github.com> Date: Mon, 3 Jul 2023 02:49:46 -0700 Subject: [PATCH] 0.1.2 --- setup.py | 2 +- zipline.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 4223e89..de4c3ee 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='zipline-cli', - version='0.1.1', + version='0.1.2', description='Python 3 CLI for Zipline', long_description=long_description, long_description_content_type="text/markdown", diff --git a/zipline.py b/zipline.py index 0b9d777..e1b98a2 100644 --- a/zipline.py +++ b/zipline.py @@ -92,11 +92,12 @@ def setup(env_file: Path) -> None: if not embed or embed.lower() not in ['n', 'o', 'no', 'noo']: output += 'ZIPLINE_EMBED=true\n' expire = input('Default Expire? [Blank for None]: ').strip().lower() - match = re.search(r'^(\d+)(?:ms|s|m|h|d|w|y)$', expire) - if not match: - print(f'Warning: invalid expire format: {expire} skipping. See --help') - else: - output += f'ZIPLINE_EXPIRE={expire}\n' + if expire: + match = re.search(r'^(\d+)(?:ms|s|m|h|d|w|y)$', expire) + if not match: + print(f'Warning: invalid expire format: {expire}. See --help') + else: + output += f'ZIPLINE_EXPIRE={expire}\n' with open(env_file, 'w') as f: f.write(output) print(f'Setup Complete. Variables Saved to: {env_file}')