diff options
author | Zane Bitter <zbitter@redhat.com> | 2018-10-23 13:28:07 -0400 |
---|---|---|
committer | Zane Bitter <zbitter@redhat.com> | 2018-10-23 13:32:14 -0400 |
commit | 777b6cd5b6b2159d32461846f53617fc7cb962be (patch) | |
tree | 1c8e977f86601b043676d32c08c4309d5420ebdd /paste | |
parent | bbff834a3e63c59141b22fefd8b3bbb8aa67762b (diff) | |
download | paste-git-777b6cd5b6b2159d32461846f53617fc7cb962be.tar.gz |
Don't raise StopIteration inside a generator
This will cause a runtime error in Python 3.7, due to PEP479.
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Diffstat (limited to 'paste')
-rw-r--r-- | paste/auth/digest.py | 3 | ||||
-rw-r--r-- | paste/cgitb_catcher.py | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/paste/auth/digest.py b/paste/auth/digest.py index 553bd88..8c8690c 100644 --- a/paste/auth/digest.py +++ b/paste/auth/digest.py @@ -52,12 +52,11 @@ def _split_auth_string(auth_string): prev = item continue else: - raise StopIteration + return yield prev.strip() prev = item yield prev.strip() - return def _auth_to_kv_pairs(auth_string): """ split a digest auth string into key, value pairs """ diff --git a/paste/cgitb_catcher.py b/paste/cgitb_catcher.py index f88ffb8..0bb8e14 100644 --- a/paste/cgitb_catcher.py +++ b/paste/cgitb_catcher.py @@ -55,7 +55,7 @@ class CgitbMiddleware(object): def catching_iter(self, app_iter, environ): if not app_iter: - raise StopIteration + return error_on_close = False try: for v in app_iter: |