summaryrefslogtreecommitdiff
path: root/tools/mergetools.py
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2016-12-03 14:50:16 +0100
committerLinus Nordberg <linus@nordu.net>2016-12-03 14:50:16 +0100
commitd1fc3a48ff50f85ff5e3098edb3c0774d110af23 (patch)
tree5791f32b58a568e74c784a9804bae2fcee0e1dbc /tools/mergetools.py
parentb13432988901f1419a04a0f2f4c411bdd3267999 (diff)
Open permdb read-only in merge_backup and merge_dist.
Diffstat (limited to 'tools/mergetools.py')
-rw-r--r--tools/mergetools.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/mergetools.py b/tools/mergetools.py
index 1ff3fa5..2713b23 100644
--- a/tools/mergetools.py
+++ b/tools/mergetools.py
@@ -453,11 +453,11 @@ def parse_args():
return (args, config, localconfig)
-def perm(dbtype, path):
+def perm(dbtype, path, write_enabled=True):
if dbtype == "filedb":
return FileDB(path)
elif dbtype == "permdb":
- return PermDB(path)
+ return PermDB(path, write_enabled=write_enabled)
assert False
def waitforfile(path):
@@ -524,8 +524,8 @@ class FileDB:
pass
class PermDB:
- def __init__(self, path):
- self.permdbobj = permdb.alloc(path)
+ def __init__(self, path, write_enabled=True):
+ self.permdbobj = permdb.alloc(path, write_enabled)
def get(self, key):
return permdb.getvalue(self.permdbobj, key)
def add(self, key, value):