From 2cc6fa6dbc01a3bcfc0d6022ba51a466f66967c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Wed, 11 May 2011 09:05:37 +0000 Subject: [PATCH] 4842: Crash when exporting in Web Family Tree svn: r17473 --- src/plugins/export/ExportFtree.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/export/ExportFtree.py b/src/plugins/export/ExportFtree.py index 850be9bd9..9486c89a0 100644 --- a/src/plugins/export/ExportFtree.py +++ b/src/plugins/export/ExportFtree.py @@ -123,7 +123,7 @@ class FtreeWriter(object): else: name_map[n] = key id_map[key] = n - id_name[key] = get_name(pn, count) + id_name[key] = get_name(pn, sn, count) f = open(self.filename,"w") @@ -194,13 +194,12 @@ def fdate(val): else: return "" -def get_name(name, count): +def get_name(name, surname, count): """returns a name string built from the components of the Name instance, in the form of Firstname Surname""" return (name.first_name + ' ' + - (name.prefix + ' ' if name.prefix else '') + - name.surname + + surname + (str(count) if count != -1 else '') + (', ' +name.suffix if name.suffix else '') )