trilby's RemotePerson's __str__() never returns None now! (Whoops.)

trilby-heavy
Marnanel Thurman 2020-05-17 22:01:16 +01:00
rodzic 866f3db5cc
commit 83c7f511b5
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -185,7 +185,12 @@ class RemotePerson(Person):
return False
def __str__(self):
return self.url
if self.url is not None:
return f'[{self.url}]'
elif self.acct is not None:
return f'[{self.acct}]'
else:
return '[<empty>]'
@property
def hostname(self):