* src/plugins/NavWebPage.py (HomePage): Dont crash on note only object
svn: r4561
This commit is contained in:
parent
627e920e48
commit
2f9ebbab0d
@ -1,6 +1,7 @@
|
|||||||
2005-05-12 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
2005-05-12 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
* src/plugins/TestcaseGenerator.py: Added generation of multiple date
|
* src/plugins/TestcaseGenerator.py: Added generation of multiple date
|
||||||
formats including invalid dates.
|
formats including invalid dates.
|
||||||
|
* src/plugins/NavWebPage.py (HomePage): Dont crash on note only object
|
||||||
|
|
||||||
2005-05-11 Don Allingham <don@gramps-project.org>
|
2005-05-11 Don Allingham <don@gramps-project.org>
|
||||||
* src/ReadGedcom.py: coerce the name into a unicode value - if the wrong character
|
* src/ReadGedcom.py: coerce the name into a unicode value - if the wrong character
|
||||||
|
@ -401,7 +401,8 @@ class HomePage(BasePage):
|
|||||||
if not obj:
|
if not obj:
|
||||||
print "%s object not found" % note_id
|
print "%s object not found" % note_id
|
||||||
else:
|
else:
|
||||||
if obj.get_mime_type()[0:5] == "image":
|
mime_type = obj.get_mime_type()
|
||||||
|
if mime_type and mime_type.startswith("image"):
|
||||||
newpath = obj.gramps_id + os.path.splitext(obj.get_path())[1]
|
newpath = obj.gramps_id + os.path.splitext(obj.get_path())[1]
|
||||||
shutil.copyfile(obj.get_path(),
|
shutil.copyfile(obj.get_path(),
|
||||||
os.path.join(html_dir,newpath))
|
os.path.join(html_dir,newpath))
|
||||||
|
Loading…
Reference in New Issue
Block a user