mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
iteritems is deprececated or doesn't exist in future versions of
python3. Instead use list(somedict.items()).
This commit is contained in:
parent
d46dfad91f
commit
6fbed7ba5b
@ -28,7 +28,7 @@ class Application(object):
|
|||||||
|
|
||||||
# Load up the any app specific configuration
|
# Load up the any app specific configuration
|
||||||
if cfg:
|
if cfg:
|
||||||
for k, v in cfg.items():
|
for k, v in list(cfg.items()):
|
||||||
self.cfg.set(k.lower(), v)
|
self.cfg.set(k.lower(), v)
|
||||||
|
|
||||||
# Load up the config file if its found.
|
# Load up the config file if its found.
|
||||||
@ -41,12 +41,12 @@ class Application(object):
|
|||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
for k, v in cfg.iteritems():
|
for k, v in list(cfg.items()):
|
||||||
self.cfg.set(k.lower(), v)
|
self.cfg.set(k.lower(), v)
|
||||||
|
|
||||||
# Lastly, update the configuration with any command line
|
# Lastly, update the configuration with any command line
|
||||||
# settings.
|
# settings.
|
||||||
for k, v in opts.__dict__.iteritems():
|
for k, v in list(opts.__dict__.items()):
|
||||||
if v is None:
|
if v is None:
|
||||||
continue
|
continue
|
||||||
self.cfg.set(k.lower(), v)
|
self.cfg.set(k.lower(), v)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user