Check for None as value for update function
svn: r1109
This commit is contained in:
parent
ff83ad8d29
commit
7248038876
@ -366,6 +366,7 @@ class GrampsParser:
|
|||||||
self.object.setMimeType(u2l(attrs['mime']))
|
self.object.setMimeType(u2l(attrs['mime']))
|
||||||
self.object.setDescription(u2l(attrs['description']))
|
self.object.setDescription(u2l(attrs['description']))
|
||||||
src = u2l(attrs["src"])
|
src = u2l(attrs["src"])
|
||||||
|
if src:
|
||||||
if src[0] != '/':
|
if src[0] != '/':
|
||||||
self.object.setPath("%s/%s" % (self.base,src))
|
self.object.setPath("%s/%s" % (self.base,src))
|
||||||
self.object.setLocal(1)
|
self.object.setLocal(1)
|
||||||
|
@ -100,9 +100,8 @@ def importData(database, filename, callback):
|
|||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
return 0
|
return 0
|
||||||
except:
|
except:
|
||||||
GnomeErrorDialog(_("Error reading %s") % filename)
|
import DisplayTrace
|
||||||
import traceback
|
DisplayTrace.DisplayTrace()
|
||||||
traceback.print_exc()
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
xml_file.close()
|
xml_file.close()
|
||||||
@ -192,9 +191,8 @@ def loadRevision(database, file, filename, revision, callback=None):
|
|||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
return 0
|
return 0
|
||||||
except:
|
except:
|
||||||
GnomeErrorDialog(_("Error reading %s") % filename)
|
import DisplayTrace
|
||||||
import traceback
|
DisplayTrace.DisplayTrace()
|
||||||
traceback.print_exc()
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
file.close()
|
file.close()
|
||||||
|
@ -83,6 +83,7 @@ class SourceSelector:
|
|||||||
del self.orig[:]
|
del self.orig[:]
|
||||||
for s in self.list:
|
for s in self.list:
|
||||||
self.orig.append(s)
|
self.orig.append(s)
|
||||||
|
if self.update:
|
||||||
self.update(self.parent)
|
self.update(self.parent)
|
||||||
Utils.destroy_passed_object(self.sourcesel)
|
Utils.destroy_passed_object(self.sourcesel)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user