diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-03-13 15:02:48 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-03-13 15:52:23 +0200 |
commit | 6e3e2de88c5a0ade97ddbfd325583bddc2bbea74 (patch) | |
tree | 514c56863131735ea00799fd66a6b1877b05eeef /obnamlib/bag_store.py | |
parent | f4e308bd1882875bcdd6e347e27f6795233b8af6 (diff) | |
download | obnam-6e3e2de88c5a0ade97ddbfd325583bddc2bbea74.tar.gz |
Add support for well-known objcts in blob stores
Diffstat (limited to 'obnamlib/bag_store.py')
-rw-r--r-- | obnamlib/bag_store.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/obnamlib/bag_store.py b/obnamlib/bag_store.py index 0e1fe448..2246f232 100644 --- a/obnamlib/bag_store.py +++ b/obnamlib/bag_store.py @@ -32,6 +32,9 @@ class BagStore(object): self._id_inventor.set_filename_maker(self._make_bag_filename) def _make_bag_filename(self, bag_id): + if isinstance(bag_id, str): + return os.path.join(self._dirname, '%s.bag' % bag_id) + basename = '%016x' % bag_id return os.path.join( self._dirname, |