summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xexamples/gbp-posttag-push4
-rw-r--r--gbp/config.py2
-rwxr-xr-xgbp/scripts/buildpackage.py4
-rwxr-xr-xgbp/scripts/clone.py4
-rwxr-xr-xgbp/scripts/config.py7
-rw-r--r--gbp/scripts/create_remote_repo.py4
-rw-r--r--gbp/scripts/dch.py4
-rw-r--r--gbp/scripts/import_dsc.py4
-rw-r--r--gbp/scripts/import_orig.py4
-rwxr-xr-xgbp/scripts/import_srpm.py4
-rwxr-xr-xgbp/scripts/pq.py4
-rwxr-xr-xgbp/scripts/pq_rpm.py4
-rwxr-xr-xgbp/scripts/pull.py4
13 files changed, 26 insertions, 27 deletions
diff --git a/examples/gbp-posttag-push b/examples/gbp-posttag-push
index 76235ad6..cabffffa 100755
--- a/examples/gbp-posttag-push
+++ b/examples/gbp-posttag-push
@@ -20,7 +20,7 @@
# --verbose: verbose command output
-import ConfigParser
+from six.moves import configparser
import os
import subprocess
import sys
@@ -83,7 +83,7 @@ def main(argv):
try:
parser = GbpOptionParser(command=os.path.basename(argv[0]), prefix='',
usage='%prog [options] paths')
- except ConfigParser.ParsingError as err:
+ except configparser.ParsingError as err:
gbp.log.error(err)
return 1
diff --git a/gbp/config.py b/gbp/config.py
index e724853b..cc46cf7b 100644
--- a/gbp/config.py
+++ b/gbp/config.py
@@ -17,7 +17,7 @@
"""handles command line and config file option parsing for the gbp commands"""
from optparse import OptionParser, OptionGroup, Option, OptionValueError
-from ConfigParser import SafeConfigParser, NoSectionError
+from six.moves.configparser import SafeConfigParser, NoSectionError
from copy import copy
import os.path
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py
index 1c48c054..0eff5150 100755
--- a/gbp/scripts/buildpackage.py
+++ b/gbp/scripts/buildpackage.py
@@ -17,7 +17,7 @@
#
"""Build a Debian package out of a Git repository"""
-import ConfigParser
+from six.moves import configparser
import errno
import os, os.path
import sys
@@ -372,7 +372,7 @@ def changes_file_suffix(dpkg_args):
def build_parser(name, prefix=None):
try:
parser = GbpOptionParserDebian(command=os.path.basename(name), prefix=prefix)
- except ConfigParser.ParsingError as err:
+ except configparser.ParsingError as err:
gbp.log.err(err)
return None
diff --git a/gbp/scripts/clone.py b/gbp/scripts/clone.py
index 4593bc6d..5232de9b 100755
--- a/gbp/scripts/clone.py
+++ b/gbp/scripts/clone.py
@@ -19,7 +19,7 @@
#
"""Clone a Git repository and set it up for gbp"""
-import ConfigParser
+from six.moves import configparser
import sys
import os, os.path
from gbp.config import (GbpOptionParser, GbpOptionGroup)
@@ -33,7 +33,7 @@ def build_parser(name):
try:
parser = GbpOptionParser(command=os.path.basename(name), prefix='',
usage='%prog [options] repository - clone a remote repository')
- except ConfigParser.ParsingError as err:
+ except configparser.ParsingError as err:
gbp.log.err(err)
return None
diff --git a/gbp/scripts/config.py b/gbp/scripts/config.py
index 07c731c0..cb5d82dc 100755
--- a/gbp/scripts/config.py
+++ b/gbp/scripts/config.py
@@ -17,11 +17,10 @@
#
"""Query and display config file values"""
-import ConfigParser
+from six.moves import configparser
import sys
import os, os.path
-from gbp.config import (GbpOptionParser, GbpOptionGroup)
-from gbp.errors import GbpError
+from gbp.config import GbpOptionParser
from gbp.scripts.supercommand import import_command
import gbp.log
@@ -30,7 +29,7 @@ def build_parser(name):
try:
parser = GbpOptionParser(command=os.path.basename(name), prefix='',
usage='%prog [options] command[.optionname] - display configuration settings')
- except ConfigParser.ParsingError as err:
+ except configparser.ParsingError as err:
gbp.log.err(err)
return None
diff --git a/gbp/scripts/create_remote_repo.py b/gbp/scripts/create_remote_repo.py
index fd74dcaa..821f0600 100644
--- a/gbp/scripts/create_remote_repo.py
+++ b/gbp/scripts/create_remote_repo.py
@@ -20,7 +20,7 @@
from __future__ import print_function
-import ConfigParser
+from six.moves import configparser
import sys
import os, os.path
import urlparse
@@ -234,7 +234,7 @@ def build_parser(name, sections=[]):
usage='%prog [options] - '
'create a remote repository',
sections=sections)
- except ConfigParser.ParsingError as err:
+ except configparser.ParsingError as err:
gbp.log.err(err)
return None
diff --git a/gbp/scripts/dch.py b/gbp/scripts/dch.py
index b6c77b1a..2df4b2d2 100644
--- a/gbp/scripts/dch.py
+++ b/gbp/scripts/dch.py
@@ -19,7 +19,7 @@
from __future__ import print_function
-import ConfigParser
+from six.moves import configparser
import os.path
import re
import sys
@@ -297,7 +297,7 @@ def build_parser(name):
try:
parser = GbpOptionParserDebian(command=os.path.basename(name),
usage='%prog [options] paths')
- except ConfigParser.ParsingError as err:
+ except configparser.ParsingError as err:
gbp.log.err(err)
return None
diff --git a/gbp/scripts/import_dsc.py b/gbp/scripts/import_dsc.py
index f4dac9c0..4c5747e7 100644
--- a/gbp/scripts/import_dsc.py
+++ b/gbp/scripts/import_dsc.py
@@ -16,7 +16,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""Import a Debian source package into a Git repository"""
-import ConfigParser
+from six.moves import configparser
import sys
import re
import os
@@ -208,7 +208,7 @@ def build_parser(name):
try:
parser = GbpOptionParserDebian(command=os.path.basename(name), prefix='',
usage='%prog [options] /path/to/package.dsc')
- except ConfigParser.ParsingError as err:
+ except configparser.ParsingError as err:
gbp.log.err(err)
return None
diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py
index 1e0e85b2..3840053d 100644
--- a/gbp/scripts/import_orig.py
+++ b/gbp/scripts/import_orig.py
@@ -17,7 +17,7 @@
#
"""Import a new upstream version into a Git repository"""
-import ConfigParser
+from six.moves import configparser
import os
import sys
import tempfile
@@ -187,7 +187,7 @@ def build_parser(name):
try:
parser = GbpOptionParserDebian(command=os.path.basename(name), prefix='',
usage='%prog [options] /path/to/upstream-version.tar.gz | --uscan')
- except ConfigParser.ParsingError as err:
+ except configparser.ParsingError as err:
gbp.log.err(err)
return None
diff --git a/gbp/scripts/import_srpm.py b/gbp/scripts/import_srpm.py
index 7ca87aa3..a976f2ad 100755
--- a/gbp/scripts/import_srpm.py
+++ b/gbp/scripts/import_srpm.py
@@ -17,7 +17,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""Import an RPM source package into a Git repository"""
-import ConfigParser
+from six.moves import configparser
import sys
import re
import os
@@ -122,7 +122,7 @@ def build_parser(name):
prefix='',
usage='%prog [options] /path/to/package'
'.src.rpm')
- except ConfigParser.ParsingError as err:
+ except configparser.ParsingError as err:
gbp.log.err(err)
return None
diff --git a/gbp/scripts/pq.py b/gbp/scripts/pq.py
index cf76c35d..1e1e96bf 100755
--- a/gbp/scripts/pq.py
+++ b/gbp/scripts/pq.py
@@ -17,7 +17,7 @@
#
"""Manage Debian patches on a patch queue branch"""
-import ConfigParser
+from six.moves import configparser
import errno
import os
import shutil
@@ -328,7 +328,7 @@ def build_parser(name):
" drop drop (delete) the patch queue associated to the current branch.\n"
" apply apply a patch\n"
" switch switch to patch-queue branch and vice versa")
- except ConfigParser.ParsingError as err:
+ except configparser.ParsingError as err:
gbp.log.err(err)
return None
diff --git a/gbp/scripts/pq_rpm.py b/gbp/scripts/pq_rpm.py
index ab50cad6..764ccff2 100755
--- a/gbp/scripts/pq_rpm.py
+++ b/gbp/scripts/pq_rpm.py
@@ -18,7 +18,7 @@
#
"""manage patches in a patch queue"""
-import ConfigParser
+from six.moves import configparser
import bz2
import errno
import gzip
@@ -363,7 +363,7 @@ drop Drop (delete) the patch queue /devel branch associated to
apply Apply a patch
switch Switch to patch-queue branch and vice versa.""")
- except ConfigParser.ParsingError as err:
+ except configparser.ParsingError as err:
gbp.log.err('Invalid config file: %s' % err)
return None
diff --git a/gbp/scripts/pull.py b/gbp/scripts/pull.py
index 65e3e492..d0911983 100755
--- a/gbp/scripts/pull.py
+++ b/gbp/scripts/pull.py
@@ -19,7 +19,7 @@
#
"""Pull remote changes and fast forward debian, upstream and pristine-tar branch"""
-import ConfigParser
+from six.moves import configparser
import sys
import os, os.path
from gbp.command_wrappers import (Command, CommandExecFailed)
@@ -73,7 +73,7 @@ def build_parser(name):
try:
parser = GbpOptionParser(command=os.path.basename(name), prefix='',
usage='%prog [options] - safely update a repository from remote')
- except ConfigParser.ParsingError as err:
+ except configparser.ParsingError as err:
gbp.log.err(err)
return None