Use six.iteritems() instead of dict.iteritems().

This commit is contained in:
Berker Peksag
2014-05-26 19:50:38 +03:00
parent 7f342c72f6
commit 386c9c7c55
14 changed files with 43 additions and 19 deletions

View File

@@ -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']

View File

@@ -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) + ":")