# Path: dput/core.py
# CONFIG_LOCATIONS = {
#     "/usr/share/dput-ng/": 30,
#     "/etc/dput.d/": 20,
#     os.path.expanduser("~/.dput.d"): 10,
#     "skel/": 100
# }
# DPUT_CONFIG_LOCATIONS = {
#     "/etc/dput.cf": 15,
#     os.path.expanduser("~/.dput.cf"): 5
# }
# SCHEMA_DIRS = [
#     "/usr/share/dput-ng/schemas",
#     "skel/schemas"
# ]
# def _write_upload_log(logfile, full_log):
# def _enable_debugging(level):
# def mangle_sys():
# def maybe_print_traceback(debug_level, stack):
# def get_local_username():
# 
# Path: dput/exceptions.py
# class HookException(DputError):
#     """
#     Thrown when there's an error checking, or creating a checker. Usually
#     thrown by a checker invoked by :class:`dput.checker.run_hooks`.
#     """
#     pass
# 
# class DputConfigurationError(DputError):
#     """
#     Errors in the parsing or retrieving of configuration files should raise
#     an instance of this, or a subclass thereof.
#     """
#     pass
# 
# Path: dput/interface.py
# BUTTON_NO = "no"


import subprocess
from dput.core import logger
from dput.exceptions import HookException, DputConfigurationError
from dput.interface import BUTTON_NO
                       "Please configure the lintian checker instead.")
        if not profile['run_lintian']:  # XXX: Broken. Fixme.
            logger.info("skipping lintian checking, enable with "
                        "run_lintian = 1 in your dput.cf")
            return

    tags = lint(
        changes._absfile,
        pedantic=True,
        info=True,
        experimental=True
    )

    sorted_tags = {}

    for tag in tags:
        if not tag['severity'] in sorted_tags:
            sorted_tags[tag['severity']] = {}
        if tag['tag'] not in sorted_tags[tag['severity']]:
            sorted_tags[tag['severity']][tag['tag']] = tag
    tags = sorted_tags

    # XXX: Make this configurable
    if not "E" in tags:
        return
    for tag in set(tags["E"]):
        print("  - %s: %s" % (tags["E"][tag]['severity'], tag))

    inp = interface.boolean('Lintian Checker',
                            'Upload despite of Lintian finding issues?',

# Path: dput/core.py
# CONFIG_LOCATIONS = {
#     "/usr/share/dput-ng/": 30,
#     "/etc/dput.d/": 20,
#     os.path.expanduser("~/.dput.d"): 10,
#     "skel/": 100
# }
# DPUT_CONFIG_LOCATIONS = {
#     "/etc/dput.cf": 15,
#     os.path.expanduser("~/.dput.cf"): 5
# }
# SCHEMA_DIRS = [
#     "/usr/share/dput-ng/schemas",
#     "skel/schemas"
# ]
# def _write_upload_log(logfile, full_log):
# def _enable_debugging(level):
# def mangle_sys():
# def maybe_print_traceback(debug_level, stack):
# def get_local_username():
# 
# Path: dput/exceptions.py
# class HookException(DputError):
#     """
#     Thrown when there's an error checking, or creating a checker. Usually
#     thrown by a checker invoked by :class:`dput.checker.run_hooks`.
#     """
#     pass
# 
# class DputConfigurationError(DputError):
#     """
#     Errors in the parsing or retrieving of configuration files should raise
#     an instance of this, or a subclass thereof.
#     """
#     pass
# 
# Path: dput/interface.py
# BUTTON_NO = "no"


# Path: dput/hooks/lintian.py
import subprocess
from dput.core import logger
from dput.exceptions import HookException, DputConfigurationError
from dput.interface import BUTTON_NO

                       "Please configure the lintian checker instead.")
        if not profile['run_lintian']:  # XXX: Broken. Fixme.
            logger.info("skipping lintian checking, enable with "
                        "run_lintian = 1 in your dput.cf")
            return

    tags = lint(
        changes._absfile,
        pedantic=True,
        info=True,
        experimental=True
    )

    sorted_tags = {}

    for tag in tags:
        if not tag['severity'] in sorted_tags:
            sorted_tags[tag['severity']] = {}
        if tag['tag'] not in sorted_tags[tag['severity']]:
            sorted_tags[tag['severity']][tag['tag']] = tag
    tags = sorted_tags

    # XXX: Make this configurable
    if not "E" in tags:
        return
    for tag in set(tags["E"]):
        print("  - %s: %s" % (tags["E"][tag]['severity'], tag))

    inp = interface.boolean('Lintian Checker',
                            'Upload despite of Lintian finding issues?',

                            default=BUTTON_NO)