# 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
            info = ""

        tag = tag.strip()
        info = info.strip()
        ret.append({
            "severity": flag,
            "component": component,
            "tag": tag,
            "info": info
        })
    return ret


def lint(path, pedantic=False, info=False, experimental=False):
    args = ["lintian", "--show-overrides"]

    if pedantic:
        args.append("--pedantic")
    if info:
        args.append("-I")
    if experimental:
        args.append("-E")

    args.append(path)

    try:
        output = subprocess.check_output(args)
    except subprocess.CalledProcessError as e:
        output = e.output
    except OSError as e:

# 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

            info = ""

        tag = tag.strip()
        info = info.strip()
        ret.append({
            "severity": flag,
            "component": component,
            "tag": tag,
            "info": info
        })
    return ret


def lint(path, pedantic=False, info=False, experimental=False):
    args = ["lintian", "--show-overrides"]

    if pedantic:
        args.append("--pedantic")
    if info:
        args.append("-I")
    if experimental:
        args.append("-E")

    args.append(path)

    try:
        output = subprocess.check_output(args)
    except subprocess.CalledProcessError as e:
        output = e.output
    except OSError as e:

        logger.warning("Failed to execute lintian: %s" % (e))