How to use the pottery.epottery 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 twisted / imaginary / pottery / wiring / __init__.py View on Github external
def requestAvatarId(self, credentials):
        u, p = credentials.username, credentials.password
        u = u.lower()
        try:
            if self.players[u][0] == p:
                return u
            raise epottery.BadPassword()
        except KeyError:
            raise epottery.NoSuchUser()
github twisted / imaginary / pottery / wiring / __init__.py View on Github external
def requestAvatarId(self, credentials):
        u, p = credentials.username, credentials.password
        u = u.lower()
        try:
            if self.players[u][0] == p:
                return u
            raise epottery.BadPassword()
        except KeyError:
            raise epottery.NoSuchUser()
github twisted / imaginary / pottery / wiring / __init__.py View on Github external
def ebAmbiguity(err):
        err.trap(epottery.AmbiguousArgument)
        exc = err.value
        if len(exc.objects) == 0:
            transport.write(getattr(err.value.action, err.value.part + "NotAvailable", "Who's that?") + "\r\n")
        else:
            transport.write("Could you be more specific?\r\n")
github twisted / imaginary / pottery / wiring / __init__.py View on Github external
def ebParse(err):
        err.trap(epottery.NoSuchCommand)
        # transport.write('Bad command or filename\r\n> ')
        transport.write('Bad command or filename\r\n')