4842: Crash when exporting in Web Family Tree
svn: r17473
This commit is contained in:
parent
3e4941632b
commit
2cc6fa6dbc
@ -123,7 +123,7 @@ class FtreeWriter(object):
|
|||||||
else:
|
else:
|
||||||
name_map[n] = key
|
name_map[n] = key
|
||||||
id_map[key] = n
|
id_map[key] = n
|
||||||
id_name[key] = get_name(pn, count)
|
id_name[key] = get_name(pn, sn, count)
|
||||||
|
|
||||||
f = open(self.filename,"w")
|
f = open(self.filename,"w")
|
||||||
|
|
||||||
@ -194,13 +194,12 @@ def fdate(val):
|
|||||||
else:
|
else:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
def get_name(name, count):
|
def get_name(name, surname, count):
|
||||||
"""returns a name string built from the components of the Name
|
"""returns a name string built from the components of the Name
|
||||||
instance, in the form of Firstname Surname"""
|
instance, in the form of Firstname Surname"""
|
||||||
|
|
||||||
return (name.first_name + ' ' +
|
return (name.first_name + ' ' +
|
||||||
(name.prefix + ' ' if name.prefix else '') +
|
surname +
|
||||||
name.surname +
|
|
||||||
(str(count) if count != -1 else '') +
|
(str(count) if count != -1 else '') +
|
||||||
(', ' +name.suffix if name.suffix else '')
|
(', ' +name.suffix if name.suffix else '')
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user