diff options
| author | Michael Merickel <github@m.merickel.org> | 2019-01-29 16:10:12 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-29 16:10:12 -0800 |
| commit | 32714630c4c84a411c1b773e0f736579c142df9c (patch) | |
| tree | b697bd00a90c32d3d101d5fde015259afcf87541 /src | |
| parent | 7bd9da72c63124c7ca007f4fa2113633bba5c403 (diff) | |
| parent | a5e0dd71d603573b2e3c366a60729caa725c9ac4 (diff) | |
| download | pyramid-32714630c4c84a411c1b773e0f736579c142df9c.tar.gz pyramid-32714630c4c84a411c1b773e0f736579c142df9c.tar.bz2 pyramid-32714630c4c84a411c1b773e0f736579c142df9c.zip | |
Merge pull request #3456 from mmerickel/fix-non-sortable-discriminators
Fix non sortable discriminators
Diffstat (limited to 'src')
| -rw-r--r-- | src/pyramid/exceptions.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/pyramid/exceptions.py b/src/pyramid/exceptions.py index 9a7054731..92a0098e0 100644 --- a/src/pyramid/exceptions.py +++ b/src/pyramid/exceptions.py @@ -3,8 +3,6 @@ from pyramid.httpexceptions import HTTPBadRequest, HTTPNotFound, HTTPForbidden NotFound = HTTPNotFound # bw compat Forbidden = HTTPForbidden # bw compat -CR = '\n' - class BadCSRFOrigin(HTTPBadRequest): """ @@ -92,14 +90,13 @@ class ConfigurationConflictError(ConfigurationError): def __str__(self): r = ["Conflicting configuration actions"] - items = sorted(self._conflicts.items()) - for discriminator, infos in items: + for discriminator, infos in self._conflicts.items(): r.append(" For: %s" % (discriminator,)) for info in infos: - for line in str(info).rstrip().split(CR): + for line in str(info).rstrip().split('\n'): r.append(" " + line) - return CR.join(r) + return '\n'.join(r) class ConfigurationExecutionError(ConfigurationError): |
