Skip to content

Commit 11db2ea

Browse files
author
Alexander Smishlajev
committed
do "slow" open (with restructuring) if schema file is not found.
this fixes test_modifyClass and test_makeNewMultilink. i am not sure how the schema can be "frozen" with new config, either.
1 parent a986233 commit 11db2ea

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

roundup/backends/back_metakit.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: back_metakit.py,v 1.85 2004-09-29 10:19:40 a1s Exp $
1+
# $Id: back_metakit.py,v 1.86 2004-09-30 09:48:12 a1s Exp $
22
'''Metakit backend for Roundup, originally by Gordon McMillan.
33
44
Known Current Bugs:
@@ -328,12 +328,9 @@ def __open(self):
328328
if not os.path.isfile(schemafile):
329329
# try old-style schema
330330
schemafile = os.path.join(self.config['HOME'], 'dbinit.py')
331-
if os.path.isfile(schemafile):
332-
if os.path.getmtime(schemafile) < dbtm:
333-
# found schema mod - it's older than the db
334-
self.fastopen = 1
335-
else:
336-
# can't find schemamod - must be frozen
331+
if os.path.isfile(schemafile) \
332+
and (os.path.getmtime(schemafile) < dbtm):
333+
# found schema file - it's older than the db
337334
self.fastopen = 1
338335

339336
# open the db

0 commit comments

Comments
 (0)