From 7f3a1a9a834620304d171de47203ed99486df4df Mon Sep 17 00:00:00 2001 From: Benjamin Schmidt Date: Tue, 15 Sep 2020 15:05:01 -0400 Subject: [PATCH] Don't use old-fashioned iteritems--it's python3 land now. --- bookwormDB/wsgi.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bookwormDB/wsgi.py b/bookwormDB/wsgi.py index b88d430..a1ae855 100644 --- a/bookwormDB/wsgi.py +++ b/bookwormDB/wsgi.py @@ -4,7 +4,6 @@ import logging import multiprocessing import gunicorn.app.base -from gunicorn.six import iteritems from datetime import datetime def content_type(query): @@ -110,9 +109,9 @@ def __init__(self, app, options=None): super(StandaloneApplication, self).__init__() def load_config(self): - config = dict([(key, value) for key, value in iteritems(self.options) + config = dict([(key, value) for key, value in self.options.items() if key in self.cfg.settings and value is not None]) - for key, value in iteritems(config): + for key, value in config.items(): self.cfg.set(key.lower(), value) def load(self):