Use six.iteritems() instead of dict.iteritems().
This commit is contained in:
@@ -19,6 +19,8 @@ from __future__ import absolute_import
|
||||
import shutil
|
||||
import uuid
|
||||
|
||||
import six
|
||||
|
||||
from werkzeug.utils import secure_filename
|
||||
|
||||
from mediagoblin.tools import common
|
||||
@@ -259,7 +261,7 @@ def storage_system_from_config(config_section):
|
||||
"""
|
||||
# This construct is needed, because dict(config) does
|
||||
# not replace the variables in the config items.
|
||||
config_params = dict(config_section.iteritems())
|
||||
config_params = dict(six.iteritems(config_section))
|
||||
|
||||
if 'storage_class' in config_params:
|
||||
storage_class = config_params['storage_class']
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import six
|
||||
|
||||
from mediagoblin.storage import StorageInterface, clean_listy_filepath
|
||||
|
||||
|
||||
@@ -120,7 +122,7 @@ class MountStorage(StorageInterface):
|
||||
v = table.get(None)
|
||||
if v:
|
||||
res.append(" " * len(indent) + repr(indent) + ": " + repr(v))
|
||||
for k, v in table.iteritems():
|
||||
for k, v in six.iteritems(table):
|
||||
if k == None:
|
||||
continue
|
||||
res.append(" " * len(indent) + repr(k) + ":")
|
||||
|
||||
Reference in New Issue
Block a user