mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
Fix superset cli for python3 (#1760)
* Fix superset cli for python3 dict.iteritems() has been removed since dict.items() returns an iterable in python3. Shouldn't be a big deal for python2 to load all the data into a list. Fix #1756 * bin/superset: avoid some work when reading config We don't need to unpack and then pack again a dictionary.
This commit is contained in:
parent
c4e943a24f
commit
abd0974897
@ -23,9 +23,9 @@ class GunicornSupersetApplication(gunicorn.app.base.BaseApplication):
|
||||
super(GunicornSupersetApplication, self).__init__()
|
||||
|
||||
def load_config(self):
|
||||
config = dict([(key, value) for key, value in self.options.iteritems()
|
||||
if key in self.cfg.settings and value is not None])
|
||||
for key, value in config.iteritems():
|
||||
config = [(key, value) for key, value in self.options.items()
|
||||
if key in self.cfg.settings and value is not None]
|
||||
for key, value in config:
|
||||
self.cfg.set(key.lower(), value)
|
||||
|
||||
def load(self):
|
||||
|
Loading…
Reference in New Issue
Block a user