diff roundup/backends/back_metakit.py @ 2712:330261e53766

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.
author Alexander Smishlajev <a1s@users.sourceforge.net>
date Thu, 30 Sep 2004 09:48:12 +0000
parents 6b18005c3bb4
children f5ae28302619
line wrap: on
line diff
--- a/roundup/backends/back_metakit.py	Wed Sep 29 10:19:40 2004 +0000
+++ b/roundup/backends/back_metakit.py	Thu Sep 30 09:48:12 2004 +0000
@@ -1,4 +1,4 @@
-# $Id: back_metakit.py,v 1.85 2004-09-29 10:19:40 a1s Exp $
+# $Id: back_metakit.py,v 1.86 2004-09-30 09:48:12 a1s Exp $
 '''Metakit backend for Roundup, originally by Gordon McMillan.
 
 Known Current Bugs:
@@ -328,12 +328,9 @@
             if not os.path.isfile(schemafile):
                 # try old-style schema
                 schemafile = os.path.join(self.config['HOME'], 'dbinit.py')
-            if os.path.isfile(schemafile):
-                if os.path.getmtime(schemafile) < dbtm:
-                    # found schema mod - it's older than the db
-                    self.fastopen = 1
-            else:
-                 # can't find schemamod - must be frozen
+            if os.path.isfile(schemafile) \
+            and (os.path.getmtime(schemafile) < dbtm):
+                # found schema file - it's older than the db
                 self.fastopen = 1
 
         # open the db

Roundup Issue Tracker: http://roundup-tracker.org/