summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2022-05-15 21:22:15 -0500
committerMichael Merickel <michael@merickel.org>2022-05-15 21:24:01 -0500
commitf18450e62b193782648ddba01355f89d36cfc726 (patch)
tree03bff17fa2a61991aedb4c18fb2a5a1d508c73ed
parent1c50e71feec86a42c8ce5432106136f09edeb9e9 (diff)
downloadpastedeploy-git-f18450e62b193782648ddba01355f89d36cfc726.tar.gz
fix up strings and upgrade format syntax
-rw-r--r--src/paste/deploy/config.py4
-rw-r--r--src/paste/deploy/loadwsgi.py6
2 files changed, 6 insertions, 4 deletions
diff --git a/src/paste/deploy/config.py b/src/paste/deploy/config.py
index 3c24151..0dae282 100644
--- a/src/paste/deploy/config.py
+++ b/src/paste/deploy/config.py
@@ -101,7 +101,7 @@ class DispatchingConfig:
conf = self.current_conf()
if conf is None:
raise AttributeError(
- "No configuration has been registered for this process " "or thread"
+ "No configuration has been registered for this process or thread"
)
return getattr(conf, attr)
@@ -119,7 +119,7 @@ class DispatchingConfig:
conf = self.current_conf()
if conf is None:
raise TypeError(
- "No configuration has been registered for this process " "or thread"
+ "No configuration has been registered for this process or thread"
)
return conf[key]
diff --git a/src/paste/deploy/loadwsgi.py b/src/paste/deploy/loadwsgi.py
index dfa231d..482b339 100644
--- a/src/paste/deploy/loadwsgi.py
+++ b/src/paste/deploy/loadwsgi.py
@@ -294,7 +294,9 @@ def loadcontext(object_type, uri, name=None, relative_to=None, global_conf=None)
scheme = scheme.lower()
if scheme not in _loaders:
raise LookupError(
- "URI scheme not known: %r (from %s)" % (scheme, ', '.join(_loaders.keys()))
+ "URI scheme not known: {!r} (from {})".format(
+ scheme, ', '.join(_loaders.keys())
+ )
)
return _loaders[scheme](
object_type,
@@ -524,7 +526,7 @@ class ConfigLoader(_Loader):
break
if len(possible) > 1:
raise LookupError(
- "Multiple protocols given in section %r: %s" % (section, possible)
+ f"Multiple protocols given in section {section!r}: {possible}"
)
if not possible:
raise LookupError("No loader given in section %r" % section)