fix name of test database template (bad sed during template->cube migration)
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 28 May 2009 11:35:29 +0200
changeset 1978 7df9c566aa3d
parent 1977 606923dff11b
child 1979 daf297034197
fix name of test database template (bad sed during template->cube migration)
devtools/__init__.py
--- a/devtools/__init__.py	Thu May 28 09:20:07 2009 +0200
+++ b/devtools/__init__.py	Thu May 28 11:35:29 2009 +0200
@@ -329,7 +329,7 @@
         pass
     if removecube:
         try:
-            os.remove('%s-cube' % dbfile)
+            os.remove('%s-template' % dbfile)
         except OSError:
             pass
 
@@ -339,11 +339,11 @@
     # remove database file if it exists (actually I know driver == 'sqlite' :)
     dbfile = source['system']['db-name']
     cleanup_sqlite(dbfile)
-    cube = '%s-cube' % dbfile
-    if exists(cube):
-        shutil.copy(cube, dbfile)
+    template = '%s-template' % dbfile
+    if exists(template):
+        shutil.copy(template, dbfile)
     else:
         # initialize the database
         from cubicweb.server import init_repository
         init_repository(config, interactive=False, vreg=vreg)
-        shutil.copy(dbfile, cube)
+        shutil.copy(dbfile, template)