Skip to content

Commit

Permalink
Changes from PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Julie Langmann <[email protected]>
  • Loading branch information
mrloop committed Sep 20, 2023
1 parent 08eedab commit 66ca7e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
4 changes: 0 additions & 4 deletions src/deadline/client/cli/_groups/bundle_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,6 @@ def _check_create_job_wait_canceled() -> bool:
def bundle_gui_submit(job_bundle_dir, browse, **args):
"""
Opens GUI to submit an Open Job Description job bundle to Amazon Deadline Cloud.
Args:
job_bundle_dir (str): Path to the job bundle directory
browse (bool): Whether to include an option for Loading a different job bundle
"""
from ...ui import gui_context_for_cli

Expand Down
14 changes: 7 additions & 7 deletions src/deadline/client/ui/widgets/job_bundle_settings_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from ...job_bundle.submission import AssetReferences
from ...job_bundle.loader import read_yaml_or_json_object
from ...job_bundle.parameters import read_job_bundle_parameters
from ...config import config_file

logger = getLogger(__name__)

Expand Down Expand Up @@ -89,21 +90,20 @@ def on_load_bundle(self):
Browse and load the selected submission bundle
"""
# Open the file picker dialog
bundle_path = os.path.expanduser(os.path.join("~", ".deadline", "job_history"))
bundle_path = os.path.expanduser(config_file.get_setting("settings.job_history_dir"))
input_job_bundle_dir = QFileDialog.getExistingDirectory(
self, "Choose Job Bundle Directory", bundle_path
)
if not input_job_bundle_dir:
return

asset_references_obj = (
read_yaml_or_json_object(input_job_bundle_dir, "asset_references", False) or {}
)

asset_references = AssetReferences.from_dict(asset_references_obj)

# Warn the user if the Job Bundle could not be loaded
try:
asset_references_obj = (
read_yaml_or_json_object(input_job_bundle_dir, "asset_references", False) or {}
)
asset_references = AssetReferences.from_dict(asset_references_obj)

# Load the template to get the bundle name
template = read_yaml_or_json_object(input_job_bundle_dir, "template", True)
name = (
Expand Down

0 comments on commit 66ca7e8

Please sign in to comment.