Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

galaxykit collection upload --skip-upload: don't instantiate client #122

Merged
merged 2 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions galaxykit/client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
client.py contains the wrapping interface for all the other modules (aside from cli.py)
"""

import logging
import platform
import sys
Expand Down
21 changes: 11 additions & 10 deletions galaxykit/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,16 +691,17 @@ def main():
if args.kind == "greet":
creds = None

if args.gw_root_url:
client = GalaxyClient(
args.server,
creds,
https_verify=https_verify,
gw_auth=True,
gw_root_url=args.gw_root_url,
)
else:
client = GalaxyClient(args.server, creds, https_verify=https_verify)
if args.kind != "collection" or args.operation != "upload" or not args.skip_upload:
if args.gw_root_url:
client = GalaxyClient(
args.server,
creds,
https_verify=https_verify,
gw_auth=True,
gw_root_url=args.gw_root_url,
)
else:
client = GalaxyClient(args.server, creds, https_verify=https_verify)

resp = None

Expand Down
8 changes: 5 additions & 3 deletions galaxykit/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ def create_repository(

registry = {"name": name, "private": private}
registry.update({"description": description}) if description is not None else False
registry.update(
{"pulp_labels": {"hide_from_search": ""}}
) if hide_from_search is not False else False
(
registry.update({"pulp_labels": {"hide_from_search": ""}})
if hide_from_search is not False
else False
)

if pipeline:
registry["pulp_labels"] = {"pipeline": pipeline}
Expand Down
1 change: 1 addition & 0 deletions galaxykit/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility functions"""

import logging
import re
import time
Expand Down
Loading