forked from importers/git-importer
Don't crash on user with missing realname either
This commit is contained in:
parent
fce8aac001
commit
68ded48be1
@ -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 = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user