Add and use get_domian_from_id

This commit is contained in:
Erik Johnston 2016-05-09 10:36:03 +01:00
parent 96d9d5d388
commit 08dfa8eee2
6 changed files with 23 additions and 28 deletions

View file

@ -21,6 +21,10 @@ from collections import namedtuple
Requester = namedtuple("Requester", ["user", "access_token_id", "is_guest"])
def get_domian_from_id(string):
return string.split(":", 1)[1]
class DomainSpecificString(
namedtuple("DomainSpecificString", ("localpart", "domain"))
):