from_celery.setup_self() didn't pay attention to default_conf_file kwarg, fixed.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 20 May 2012 20:17:49 +0000 (15:17 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 20 May 2012 20:17:49 +0000 (15:17 -0500)
mediagoblin/init/celery/from_celery.py

index c20f02c7521f1186ee1a83e2e940ca600c2ec103..b829725525eb5ec69761c0758891200bcf72bb9d 100644 (file)
@@ -35,10 +35,11 @@ def setup_self(check_environ_for_conf=True, module_name=OUR_MODULENAME,
     Note that if celery_setup_elsewhere is set in your config file,
     this simply won't work.
     """
-    if os.path.exists(os.path.abspath('mediagoblin_local.ini')):
-        default_conf_file = 'mediagoblin_local.ini'
-    else:
-        default_conf_file = 'mediagoblin.ini'
+    if not default_conf_file:
+        if os.path.exists(os.path.abspath('mediagoblin_local.ini')):
+            default_conf_file = 'mediagoblin_local.ini'
+        else:
+            default_conf_file = 'mediagoblin.ini'
 
     if check_environ_for_conf:
         mgoblin_conf_file = os.path.abspath(