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
def __init__(self, message): ParseError.__init__(self, "HTTP", message)
def __init__(self, data): ParseError.__init__(self, "MSN Object", "invalid MSN Object", data)
def __init__(self, context): ParseError.__init__(self, "FT Context", "invalid context", context)
def __init__(self, version, message, infos=''): ParseError.__init__(self, "TLPv%i" % version, message, infos) self.version = version
def __init__(self, message, infos=''): ParseError.__init__(self, "SLP", message, infos)
def __init__(self, details="", infos=""): ParseError.__init__(self, "SOAP", details, infos)