From 6fbed7ba5b4758429df28048a84047de672a3486 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Mon, 17 May 2010 06:48:28 +0200 Subject: [PATCH] iteritems is deprececated or doesn't exist in future versions of python3. Instead use list(somedict.items()). --- gunicorn/app/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gunicorn/app/base.py b/gunicorn/app/base.py index c5c88990..34070baf 100644 --- a/gunicorn/app/base.py +++ b/gunicorn/app/base.py @@ -28,7 +28,7 @@ class Application(object): # Load up the any app specific configuration if cfg: - for k, v in cfg.items(): + for k, v in list(cfg.items()): self.cfg.set(k.lower(), v) # Load up the config file if its found. @@ -41,12 +41,12 @@ class Application(object): traceback.print_exc() sys.exit(1) - for k, v in cfg.iteritems(): + for k, v in list(cfg.items()): self.cfg.set(k.lower(), v) # Lastly, update the configuration with any command line # settings. - for k, v in opts.__dict__.iteritems(): + for k, v in list(opts.__dict__.items()): if v is None: continue self.cfg.set(k.lower(), v)