Fix another file left open
This commit is contained in:
parent
0b22891858
commit
75ffd7c41b
@ -155,7 +155,8 @@ class CLIDbManager:
|
|||||||
dbid = "bsddb"
|
dbid = "bsddb"
|
||||||
dbid_path = os.path.join(dirpath, "database.txt")
|
dbid_path = os.path.join(dirpath, "database.txt")
|
||||||
if os.path.isfile(dbid_path):
|
if os.path.isfile(dbid_path):
|
||||||
dbid = open(dbid_path).read().strip()
|
with open(dbid_path) as file:
|
||||||
|
dbid = file.read().strip()
|
||||||
if not self.is_locked(dirpath):
|
if not self.is_locked(dirpath):
|
||||||
try:
|
try:
|
||||||
database = self.dbstate.make_database(dbid)
|
database = self.dbstate.make_database(dbid)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user