From d1fc3a48ff50f85ff5e3098edb3c0774d110af23 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Sat, 3 Dec 2016 14:50:16 +0100 Subject: Open permdb read-only in merge_backup and merge_dist. --- tools/mergetools.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/mergetools.py') 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): -- cgit v1.1