# Path: src/zinc/formats.py

# 
# Path: src/zinc/defaults.py



from .formats import Formats
from .defaults import defaults
def append_file_extension(path, ext):
    """Appends the given extension to the path. If `ext` is `None`,
    `path` is returned."""

    if ext is not None:
        return '%s.%s' % (path, ext)
    return path


def append_file_extension_for_format(path, format):
    """Appends the proper filename extension for the given format."""

    ext = file_extension_for_format(format)
    return append_file_extension(path, ext)


def distro_previous_name(distro_name):
    return '%s%s' % (defaults['catalog_prev_distro_prefix'], distro_name)


def distro_name_errors(distro_name):
    """Returns a list of errors in the distro name. Empty list means distro name
    is valid."""

    errors = []

    if len(distro_name) == 0:
        errors.append(
            "distro name cannot be zero length")


# Path: src/zinc/formats.py

# 
# Path: src/zinc/defaults.py



# Path: src/zinc/helpers.py
from .formats import Formats
from .defaults import defaults

def append_file_extension(path, ext):
    """Appends the given extension to the path. If `ext` is `None`,
    `path` is returned."""

    if ext is not None:
        return '%s.%s' % (path, ext)
    return path


def append_file_extension_for_format(path, format):
    """Appends the proper filename extension for the given format."""

    ext = file_extension_for_format(format)
    return append_file_extension(path, ext)


def distro_previous_name(distro_name):
    return '%s%s' % (defaults['catalog_prev_distro_prefix'], distro_name)


def distro_name_errors(distro_name):
    """Returns a list of errors in the distro name. Empty list means distro name
    is valid."""

    errors = []

    if len(distro_name) == 0:
        errors.append(
            "distro name cannot be zero length")


    if distro_name.startswith(defaults['catalog_prev_distro_prefix']):