Пример #1
0
def parse_account(account):
    """Parse account string and extract end-point info if available."""
    account = account.lower()  # normalize account
    guid = None

    if ';' in account:
        account, guid = account.split(';', 1)
        try:
            guid = uuid.UUID(guid)
        except:
            raise ParseError("Account", "invalid machine GUID", guid)

    if not '@' in account:
        raise ParseError("Account", "invalid email address", account)

    return account, guid
Пример #2
0
 def __init__(self, message):
     ParseError.__init__(self, "HTTP", message)
Пример #3
0
 def __init__(self, data):
     ParseError.__init__(self, "MSN Object", "invalid MSN Object", data)
Пример #4
0
 def __init__(self, context):
     ParseError.__init__(self, "FT Context", "invalid context", context)
Пример #5
0
 def __init__(self, version, message, infos=''):
     ParseError.__init__(self, "TLPv%i" % version, message, infos)
     self.version = version
Пример #6
0
 def __init__(self, message, infos=''):
     ParseError.__init__(self, "SLP", message, infos)
Пример #7
0
 def __init__(self, message):
     ParseError.__init__(self, "HTTP", message)
Пример #8
0
 def __init__(self, details="", infos=""):
     ParseError.__init__(self, "SOAP", details, infos)
Пример #9
0
 def __init__(self, details="", infos=""):
     ParseError.__init__(self, "SOAP", details, infos)