Skip to content

Commit

Permalink
Make model store a bit more readable. I think?
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Jan 24, 2024
1 parent 79f67fd commit f828a4e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/galaxy/model/store/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1931,7 +1931,10 @@ def add(src, dest):
as_dict["extra_files_path"] = extra_files_path
return

if file_name:
have_file_path_on_disk = bool(file_name)
have_extra_files_path_on_disk = bool(extra_files_path)

if have_file_path_on_disk:
if not os.path.exists(dir_path):
os.makedirs(dir_path)

Expand All @@ -1943,7 +1946,7 @@ def add(src, dest):
add(src, dest)
as_dict["file_name"] = arcname

if extra_files_path:
if have_extra_files_path_on_disk:
try:
file_list = os.listdir(extra_files_path)
except OSError:
Expand Down

0 comments on commit f828a4e

Please sign in to comment.