Files @ 260a7a01b054
Branch filter:

Location: kallithea/rhodecode/lib/vcs/exceptions.py

Mads Kiilerich
follow Python conventions for boolean values

True and False might be singletons and the "default" values for "boolean"
expressions, but "all" values in Python has a boolean value and should be
evaluated as such. Checking with 'is True' and 'is False' is thus confusing,
error prone and unnessarily complex.

If we anywhere rely and nullable boolean fields from the database layer and
don't want the null value to be treated as False then we should check
explicitly for null with 'is None'.
# -*- coding: utf-8 -*-
"""
    vcs.exceptions
    ~~~~~~~~~~~~~~

    Custom exceptions module

    :created_on: Apr 8, 2010
    :copyright: (c) 2010-2011 by Marcin Kuzminski, Lukasz Balcerzak.
"""


class VCSError(Exception):
    pass


class RepositoryError(VCSError):
    pass


class EmptyRepositoryError(RepositoryError):
    pass


class TagAlreadyExistError(RepositoryError):
    pass


class TagDoesNotExistError(RepositoryError):
    pass


class BranchAlreadyExistError(RepositoryError):
    pass


class BranchDoesNotExistError(RepositoryError):
    pass


class ChangesetError(RepositoryError):
    pass


class ChangesetDoesNotExistError(ChangesetError):
    pass


class CommitError(RepositoryError):
    pass


class NothingChangedError(CommitError):
    pass


class NodeError(VCSError):
    pass


class RemovedFileNodeError(NodeError):
    pass


class NodeAlreadyExistsError(CommitError):
    pass


class NodeAlreadyChangedError(CommitError):
    pass


class NodeDoesNotExistError(CommitError):
    pass


class NodeNotChangedError(CommitError):
    pass


class NodeAlreadyAddedError(CommitError):
    pass


class NodeAlreadyRemovedError(CommitError):
    pass


class ImproperArchiveTypeError(VCSError):
    pass

class CommandError(VCSError):
    pass