How to use the pottery.exceptions.PrimitiveError function in pottery

To help you get started, we’ve selected a few pottery examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brainix / pottery / pottery / exceptions.py View on Github external
self._key = key

    def __repr__(self):
        return "{}(masters={}, key='{}')".format(
            self.__class__.__name__,
            list(self._masters),
            self._key,
        )

    def __str__(self):
        return "masters={}, key='{}'".format(list(self._masters), self._key)

class QuorumNotAchieved(PrimitiveError, RuntimeError):
    ...

class TooManyExtensions(PrimitiveError, RuntimeError):
    ...

class ReleaseUnlockedLock(PrimitiveError, RuntimeError):
    ...
github brainix / pottery / pottery / exceptions.py View on Github external
return "{}(masters={}, key='{}')".format(
            self.__class__.__name__,
            list(self._masters),
            self._key,
        )

    def __str__(self):
        return "masters={}, key='{}'".format(list(self._masters), self._key)

class QuorumNotAchieved(PrimitiveError, RuntimeError):
    ...

class TooManyExtensions(PrimitiveError, RuntimeError):
    ...

class ReleaseUnlockedLock(PrimitiveError, RuntimeError):
    ...
github brainix / pottery / pottery / exceptions.py View on Github external
def __init__(self, masters, key):
        super().__init__()
        self._masters = masters
        self._key = key

    def __repr__(self):
        return "{}(masters={}, key='{}')".format(
            self.__class__.__name__,
            list(self._masters),
            self._key,
        )

    def __str__(self):
        return "masters={}, key='{}'".format(list(self._masters), self._key)

class QuorumNotAchieved(PrimitiveError, RuntimeError):
    ...

class TooManyExtensions(PrimitiveError, RuntimeError):
    ...

class ReleaseUnlockedLock(PrimitiveError, RuntimeError):
    ...