diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2014-05-26 19:50:38 +0300 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2014-05-26 19:50:38 +0300 |
commit | 386c9c7c55147b27c258edd5deee36594553493d (patch) | |
tree | d50b1554106a1f17a1f5402fdece81cc570bd873 /mediagoblin/storage | |
parent | 7f342c72f64594775bac1bcce81b32ae9e18e6ac (diff) | |
download | mediagoblin-386c9c7c55147b27c258edd5deee36594553493d.tar.lz mediagoblin-386c9c7c55147b27c258edd5deee36594553493d.tar.xz mediagoblin-386c9c7c55147b27c258edd5deee36594553493d.zip |
Use six.iteritems() instead of dict.iteritems().
Diffstat (limited to 'mediagoblin/storage')
-rw-r--r-- | mediagoblin/storage/__init__.py | 4 | ||||
-rw-r--r-- | mediagoblin/storage/mountstorage.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/mediagoblin/storage/__init__.py b/mediagoblin/storage/__init__.py index 3aa1f4a4..12109748 100644 --- a/mediagoblin/storage/__init__.py +++ b/mediagoblin/storage/__init__.py @@ -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'] diff --git a/mediagoblin/storage/mountstorage.py b/mediagoblin/storage/mountstorage.py index dffc619b..4125a88d 100644 --- a/mediagoblin/storage/mountstorage.py +++ b/mediagoblin/storage/mountstorage.py @@ -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) + ":") |