Skip to content

Instantly share code, notes, and snippets.

Created February 6, 2014 11:54
Show Gist options
  • Save clayg/8842753 to your computer and use it in GitHub Desktop.
Save clayg/8842753 to your computer and use it in GitHub Desktop.
diff --git a/swift/common/ b/swift/common/
index f6a22c8..07cd5df 100644
--- a/swift/common/
+++ b/swift/common/
@@ -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):
- = loadapp('config:' + conf_path)
+ = loadapp(conf_path)
self.user_agent = user_agent
self.request_tries = request_tries
diff --git a/swift/common/ b/swift/common/
index 1b9d8e4..5d97219 100644
--- a/swift/common/
+++ b/swift/common/
@@ -305,11 +305,12 @@ def loadcontext(object_type, uri, name=None, relative_to=None,
-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 == '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