summaryrefslogtreecommitdiff
path: root/gbp
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-02-19 13:09:31 +0100
committerGuido Günther <agx@sigxcpu.org>2015-02-20 13:00:52 +0100
commit2816c80e27f08ff715ac8f8ef4b77dc678fc606a (patch)
treee6942d0b376c805c52285d05bb3e0ce46150fbec /gbp
parente9d53ae1f4e2c4bed324421ab95382648acf8dc5 (diff)
Use six.iteritems() and six.iterkeys()
to work towards Python3 support Gbp-Dch: Ignore
Diffstat (limited to 'gbp')
-rw-r--r--gbp/pkg/__init__.py4
-rw-r--r--gbp/scripts/create_remote_repo.py5
2 files changed, 7 insertions, 2 deletions
diff --git a/gbp/pkg/__init__.py b/gbp/pkg/__init__.py
index 34f81cd..f3a81ae 100644
--- a/gbp/pkg/__init__.py
+++ b/gbp/pkg/__init__.py
@@ -21,6 +21,8 @@ import os
import re
import glob
+import six
+
import gbp.command_wrappers as gbpc
from gbp.errors import GbpError
@@ -83,7 +85,7 @@ def parse_archive_filename(filename):
base_name = ".".join(split[:-1])
(archive_fmt, compression) = (split[-1], None)
else:
- for (c, o) in compressor_opts.iteritems():
+ for (c, o) in six.iteritems(compressor_opts):
if o[1] == split[-1]:
base_name = ".".join(split[:-1])
compression = c
diff --git a/gbp/scripts/create_remote_repo.py b/gbp/scripts/create_remote_repo.py
index 821f060..73bd270 100644
--- a/gbp/scripts/create_remote_repo.py
+++ b/gbp/scripts/create_remote_repo.py
@@ -27,6 +27,9 @@ import urlparse
import subprocess
import tty, termios
import re
+
+import six
+
from gbp.deb.changelog import ChangeLog, NoChangeLogError
from gbp.command_wrappers import (CommandExecFailed, GitCommand)
from gbp.config import (GbpOptionParserDebian, GbpOptionGroup)
@@ -68,7 +71,7 @@ def print_config(remote, branches):
def sort_dict(d):
"""Return a sorted list of (key, value) tuples"""
s = []
- for key in sorted(d.iterkeys()):
+ for key in sorted(six.iterkeys(d)):
s.append((key, d[key]))
return s