8000 updates to error handling for repository finding · sassoftware/python-sasctl@6ac153b · GitHub
[go: up one dir, main page]

Skip to content

Commit 6ac153b

Browse files
committed
updates to error handling for repository finding
1 parent b3c2912 commit 6ac153b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/sasctl/tasks.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,11 +1034,10 @@ def upload_local_model(
10341034
raise e
10351035

10361036
# Unable to find or create the repo.
1037-
if repository is None and repo_name is None:
1037+
if not repository and not repo_name:
10381038
raise ValueError("Unable to find a default repository")
1039-
1040-
if repository is None:
1041-
raise ValueError("Unable to find repository '{}'".format(repository))
1039+
elif not repository:
1040+
raise ValueError(f"Unable to find repository '{repo_name}'")
10421041
p = mr.get_project(project_name)
10431042
if p is None:
10441043
mr.create_project(project_name, repository)

0 commit comments

Comments
 (0)
0