Skip to content

Commit

Permalink
DerivaDownload: Allow string formatting from environment on output ba…
Browse files Browse the repository at this point in the history
…g name.

Bump version.
  • Loading branch information
mikedarcy committed Oct 30, 2019
1 parent 94c3b8f commit 399d7dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deriva/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.8.9"
__version__ = "0.9.0"

from deriva.core.utils.core_utils import *
from deriva.core.base_cli import BaseCLI, KeyValuePairArgs
Expand Down
3 changes: 2 additions & 1 deletion deriva/transfer/download/deriva_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ def download(self, **kwargs):
bag_config = self.config.get('bag')
create_bag = True if bag_config else False
if create_bag:
bag_name = bag_config.get('bag_name', ''.join(["deriva_bag", '_', time.strftime("%Y-%m-%d_%H.%M.%S")]))
bag_name = bag_config.get(
'bag_name', ''.join(["deriva_bag", '_', time.strftime("%Y-%m-%d_%H.%M.%S")])).format(**self.envars)
bag_path = os.path.abspath(os.path.join(self.output_dir, bag_name))
bag_archiver = bag_config.get('bag_archiver')
bag_algorithms = bag_config.get('bag_algorithms', ['sha256'])
Expand Down

0 comments on commit 399d7dc

Please sign in to comment.