Skip to content

Commit

Permalink
Don't use old-fashioned iteritems--it's python3 land now.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmschmidt committed Sep 15, 2020
1 parent ab28f20 commit 7f3a1a9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bookwormDB/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 7f3a1a9

Please sign in to comment.