from clyent.errors import ClyentError

class BinstarError(ClyentError):

    def __init__(self, *args, **kwargs):
        Exception.__init__(self, *args, **kwargs)

        if not hasattr(self, 'message'):
            self.message = args[0] if args else None

class Unauthorized(BinstarError):
    pass

class Conflict(BinstarError):
    pass

class NotFound(BinstarError, IndexError):

    def __init__(self, *args, **kwargs):
        BinstarError.__init__(self, *args, **kwargs)
        IndexError.__init__(self, *args, **kwargs)

        self.message = args[0]

class UserError(BinstarError):
    pass

class ServerError(BinstarError):
    pass


class ShowHelp(BinstarError):
    pass


class NoMetadataError(BinstarError):
    pass


class NotebookNotExist(BinstarError):
    def __init__(self, notebook):
        msg = "{} does not exist.".format(notebook)
        self.notebook = notebook
        super(BinstarError, self).__init__(msg)

from clyent.errors import ClyentError


class BinstarError(ClyentError):
    def __init__(self, *args, **kwargs):
        Exception.__init__(self, *args, **kwargs)

        if not hasattr(self, 'message'):
            self.message = args[0] if args else None


class Unauthorized(BinstarError):
    pass


class Conflict(BinstarError):
    pass


class NotFound(BinstarError, IndexError):
    def __init__(self, *args, **kwargs):
        BinstarError.__init__(self, *args, **kwargs)
        IndexError.__init__(self, *args, **kwargs)

        self.message = args[0]


class UserError(BinstarError):
    pass


class ServerError(BinstarError):
    pass


class ShowHelp(BinstarError):
    pass


class NoMetadataError(BinstarError):
    pass


class NotebookNotExist(BinstarError):
    def __init__(self, notebook):
        msg = "{} does not exist.".format(notebook)
        self.notebook = notebook
        super(BinstarError, self).__init__(msg)

make file pep8 compliant