Don't crash on user with missing realname either

This commit is contained in:
Stephan Kulow 2022-11-02 10:52:37 +01:00
parent fce8aac001
commit 68ded48be1

View File

@ -10,6 +10,7 @@ FAKE_ACCOUNTS = (
"$user", "$user",
"embar-", "embar-",
"michel_mno", "michel_mno",
"guinux",
) )
@ -17,6 +18,8 @@ class User:
def parse(self, xml, userid): def parse(self, xml, userid):
self.userid = userid self.userid = userid
self.realname = xml.find("realname").text self.realname = xml.find("realname").text
if self.realname is None:
self.realname = ""
self.email = xml.find("email").text self.email = xml.find("email").text
if self.email is None: if self.email is None:
self.email = "" self.email = ""