summaryrefslogtreecommitdiff
path: root/obnamlib/bag_store.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-03-13 15:02:48 +0200
committerLars Wirzenius <liw@liw.fi>2016-03-13 15:52:23 +0200
commit6e3e2de88c5a0ade97ddbfd325583bddc2bbea74 (patch)
tree514c56863131735ea00799fd66a6b1877b05eeef /obnamlib/bag_store.py
parentf4e308bd1882875bcdd6e347e27f6795233b8af6 (diff)
downloadobnam-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.py3
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,