Code optimizations wrt handling of None - bug 2212

svn: r10811
This commit is contained in:
Gerald Britton
2008-06-16 15:01:46 +00:00
parent 47095b4e98
commit 4982292774
124 changed files with 379 additions and 377 deletions

View File

@ -120,7 +120,7 @@ class CalendarGramplet(Gramplet):
if birth_ref:
birth_event = self.gui.dbstate.db.get_event_from_handle(birth_ref.ref)
birth_date = birth_event.get_date_object()
if self.birthdays and birth_date != None:
if self.birthdays and birth_date is not None:
year = birth_date.get_year()
month = birth_date.get_month()
day = birth_date.get_day()
@ -909,7 +909,7 @@ class PythonGramplet(Gramplet):
buffer.place_cursor(end)
return True
_retval = self.process_command(line)
if _retval != None:
if _retval is not None:
self.append_text("%s\n" % str(_retval))
self.append_text("%s " % self.prompt)
end = buffer.get_end_iter()