[web data] fix datadir handling to avoid web test failure introduced somewhere in default branch
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 13 May 2011 13:40:48 +0200
changeset 7380 5ad8b2f951ba
parent 7379 31adf834a8c6
child 7381 a10b2d90d1a3
[web data] fix datadir handling to avoid web test failure introduced somewhere in default branch
devtools/__init__.py
web/webconfig.py
--- a/devtools/__init__.py	Fri May 13 10:42:04 2011 +0200
+++ b/devtools/__init__.py	Fri May 13 13:40:48 2011 +0200
@@ -212,9 +212,6 @@
     # web config methods needed here for cases when we use this config as a web
     # config
 
-    def instance_md5_version(self):
-        return ''
-
     def default_base_url(self):
         return BASE_URL
 
--- a/web/webconfig.py	Fri May 13 10:42:04 2011 +0200
+++ b/web/webconfig.py	Fri May 13 13:40:48 2011 +0200
@@ -300,7 +300,10 @@
         if not (self.repairing or self.creating):
             self.global_set_option('base-url', baseurl)
         httpsurl = self['https-url']
-        datadir_path = 'data/' if self.debugmode else 'data/%s/' % self.instance_md5_version()
+        if (self.debugmode or self.mode == 'test'):
+            datadir_path = 'data/'
+        else:
+            datadir_path = 'data/%s/' % self.instance_md5_version()
         if httpsurl:
             if httpsurl[-1] != '/':
                 httpsurl += '/'