incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject git commit: [#7178] Always return a MockSOLR instead of None, since things break without it
Date Wed, 26 Feb 2014 20:59:11 GMT
Repository: incubator-allura
Updated Branches:
  refs/heads/cj/7178 [created] faf212e45


[#7178] Always return a MockSOLR instead of None, since things break without it

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/faf212e4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/faf212e4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/faf212e4

Branch: refs/heads/cj/7178
Commit: faf212e456e4818672689b522ea6bcc9e4092851
Parents: e3af39b
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Wed Feb 26 20:58:44 2014 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed Feb 26 20:58:44 2014 +0000

----------------------------------------------------------------------
 Allura/allura/lib/app_globals.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/faf212e4/Allura/allura/lib/app_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index f46c1eb..0f6f08e 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -150,17 +150,14 @@ class Globals(object):
         # skip empty strings in case of extra commas
         self.solr_server = [s for s in self.solr_server if s]
         self.solr_query_server = config.get('solr.query_server')
-        if asbool(config.get('solr.mock')):
-            self.solr = self.solr_short_timeout = MockSOLR()
-        elif self.solr_server:
+        if self.solr_server:
             self.solr = make_solr_from_config(
                 self.solr_server, self.solr_query_server)
             self.solr_short_timeout = make_solr_from_config(
                 self.solr_server, self.solr_query_server,
                 timeout=int(config.get('solr.short_timeout', 10)))
         else:  # pragma no cover
-            self.solr = None
-            self.solr_short_timeout = None
+            self.solr = self.solr_short_timeout = MockSOLR()
         self.use_queue = asbool(config.get('use_queue', False))
 
         # Load login/logout urls; only used for customized logins


Mime
View raw message