This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/swift/common/internal_client.py b/swift/common/internal_client.py | |
index f6a22c8..07cd5df 100644 | |
--- a/swift/common/internal_client.py | |
+++ b/swift/common/internal_client.py | |
@@ -15,7 +15,6 @@ | |
from eventlet import sleep, Timeout | |
import json | |
-from paste.deploy import loadapp | |
import struct | |
from sys import exc_info | |
import zlib | |
@@ -25,6 +24,7 @@ from zlib import compressobj | |
from swift.common.utils import quote | |
from swift.common.http import HTTP_NOT_FOUND | |
from swift.common.swob import Request | |
+from swift.common.wsgi import loadapp | |
class UnexpectedResponse(Exception): | |
@@ -133,7 +133,7 @@ class InternalClient(object): | |
""" | |
def __init__(self, conf_path, user_agent, request_tries): | |
- self.app = loadapp('config:' + conf_path) | |
+ self.app = loadapp(conf_path) | |
self.user_agent = user_agent | |
self.request_tries = request_tries | |
diff --git a/swift/common/wsgi.py b/swift/common/wsgi.py | |
index 1b9d8e4..5d97219 100644 | |
--- a/swift/common/wsgi.py | |
+++ b/swift/common/wsgi.py | |
@@ -305,11 +305,12 @@ def loadcontext(object_type, uri, name=None, relative_to=None, | |
global_conf=global_conf) | |
-def loadapp(conf_file, global_conf): | |
+def loadapp(conf_file, global_conf=None): | |
""" | |
Loads a context from a config file, and if the context is a pipeline | |
then presents the app with the opportunity to modify the pipeline. | |
""" | |
+ global_conf = global_conf or {} | |
ctx = loadcontext(loadwsgi.APP, conf_file, global_conf=global_conf) | |
if ctx.object_type.name == 'pipeline': | |
# give app the opportunity to modify the pipeline context |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment