Skip to content
Snippets Groups Projects
Commit 7bb7ef1a authored by dilawar's avatar dilawar :ant:
Browse files

fix: removed walrus operator

Requires  python3.8 minimal
parent d09cde5c
No related branches found
No related tags found
No related merge requests found
Pipeline #3629 failed with stages
in 55 seconds
...@@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.1.3] - 2022-09-29 ## [0.1.3] - 2022-09-29
## Added ## Added
- Adds the public API. - Use the public API by default
- Supports Python3.7+
## Fixed ## Fixed
- Removed 'submit' command. It will be added later. - Removed 'submit' command. It will be added later.
......
...@@ -135,7 +135,8 @@ def run_pipeline(user_input: str, server: str = "https://public.bitia.link"): ...@@ -135,7 +135,8 @@ def run_pipeline(user_input: str, server: str = "https://public.bitia.link"):
Prepare the user directory to send to the server. User can also provide link Prepare the user directory to send to the server. User can also provide link
to the pipeline to run. to the pipeline to run.
""" """
if (path := Path(user_input)).exists(): path = Path(user_input)
if path.exists():
if path.is_dir(): if path.is_dir():
pipeline_zip = prepare_archive(path) pipeline_zip = prepare_archive(path)
elif path.is_file() and path.suffix.lower() == ".zip": elif path.is_file() and path.suffix.lower() == ".zip":
...@@ -150,7 +151,7 @@ def run_pipeline(user_input: str, server: str = "https://public.bitia.link"): ...@@ -150,7 +151,7 @@ def run_pipeline(user_input: str, server: str = "https://public.bitia.link"):
else: else:
# generate a temporary pipeline and submit. # generate a temporary pipeline and submit.
pipeline_zip = create_pipeline_from_command(user_input) pipeline_zip = create_pipeline_from_command(user_input)
logging.info(f"Created pipeline in {pipeline_zip}") logger.info(f"Created pipeline in {pipeline_zip}")
submit_job(pipeline_zip, server) submit_job(pipeline_zip, server)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment