# --verbose: verbose command output
-import ConfigParser
+from six.moves import configparser
import os
import subprocess
import sys
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
"""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
#
"""Build a Debian package out of a Git repository"""
-import ConfigParser
+from six.moves import configparser
import errno
import os, os.path
import sys
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
#
"""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)
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
#
"""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
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
from __future__ import print_function
-import ConfigParser
+from six.moves import configparser
import sys
import os, os.path
import urlparse
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
from __future__ import print_function
-import ConfigParser
+from six.moves import configparser
import os.path
import re
import sys
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
# 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
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
#
"""Import a new upstream version into a Git repository"""
-import ConfigParser
+from six.moves import configparser
import os
import sys
import tempfile
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
# 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
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
#
"""Manage Debian patches on a patch queue branch"""
-import ConfigParser
+from six.moves import configparser
import errno
import os
import shutil
" 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
#
"""manage patches in a patch queue"""
-import ConfigParser
+from six.moves import configparser
import bz2
import errno
import gzip
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
#
"""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)
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