diff options
author | Guido Günther <agx@sigxcpu.org> | 2015-02-19 12:30:54 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2015-02-20 12:40:14 +0100 |
commit | 4766e1190a7ccb4c5a8f21ce3e8919637ff9c142 (patch) | |
tree | 8bab0ef8f6677f18ffdccf257bf90425ccbdfe10 /gbp/scripts | |
parent | 0a4725c045a5a55592dafd41c6ef6f9bab4791cd (diff) |
Handle ConfigParser -> configparser rename
to work towards Python3 support
Gbp-Dch: Ignore
Diffstat (limited to 'gbp/scripts')
-rwxr-xr-x | gbp/scripts/buildpackage.py | 4 | ||||
-rwxr-xr-x | gbp/scripts/clone.py | 4 | ||||
-rwxr-xr-x | gbp/scripts/config.py | 7 | ||||
-rw-r--r-- | gbp/scripts/create_remote_repo.py | 4 | ||||
-rw-r--r-- | gbp/scripts/dch.py | 4 | ||||
-rw-r--r-- | gbp/scripts/import_dsc.py | 4 | ||||
-rw-r--r-- | gbp/scripts/import_orig.py | 4 | ||||
-rwxr-xr-x | gbp/scripts/import_srpm.py | 4 | ||||
-rwxr-xr-x | gbp/scripts/pq.py | 4 | ||||
-rwxr-xr-x | gbp/scripts/pq_rpm.py | 4 | ||||
-rwxr-xr-x | gbp/scripts/pull.py | 4 |
11 files changed, 23 insertions, 24 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py index 1c48c05..0eff515 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 4593bc6..5232de9 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 07c731c..cb5d82d 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 fd74dca..821f060 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 b6c77b1..2df4b2d 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 f4dac9c..4c5747e 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 1e0e85b..3840053 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 7ca87aa..a976f2a 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 cf76c35..1e1e96b 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 ab50cad..764ccff 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 65e3e49..d091198 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 |