~ubuntu-branches/ubuntu/wily/gramps/wily

« back to all changes in this revision

Viewing changes to gramps/gen/utils/db.py

  • Committer: Package Import Robot
  • Author(s): Ross Gammon
  • Date: 2015-05-16 11:49:41 UTC
  • mfrom: (39.1.17 sid)
  • Revision ID: package-import@ubuntu.com-20150516114941-hiku87mi6p7wbjba
Tags: 4.1.3~dfsg-1
* New upstream release
* Fixes manpage desription of import function (LP: #1427444)
* Fixes crash when closing detatched gramplet (Closes: #785393)

Show diffs side-by-side

added added

removed removed

Lines of Context:
261
261
    """
262
262
    participant = ""
263
263
    ellipses = False
264
 
    result_list = list(db.find_backlink_handles(event_handle, 
265
 
                             include_classes=['Person', 'Family']))
 
264
    try:
 
265
        result_list = list(db.find_backlink_handles(event_handle,
 
266
                                 include_classes=['Person', 'Family']))
 
267
    except:
 
268
        # during a magic batch transaction find_backlink_handles tries to
 
269
        # access the reference_map_referenced_map which is closed
 
270
        # under those circumstances.
 
271
        return ''
 
272
 
266
273
    #obtain handles without duplicates
267
274
    people = set([x[1] for x in result_list if x[0] == 'Person'])
268
275
    families = set([x[1] for x in result_list if x[0] == 'Family'])
328
335
    elif nav_type == 'Event':
329
336
        obj = db.get_event_from_handle(handle)
330
337
        if obj:
331
 
            try:
332
 
                who = get_participant_from_event(db, handle)
333
 
            except:
334
 
                # get_participants_from_event fails when called during a magic
335
 
                # batch transaction because find_backlink_handles tries to
336
 
                # access the reference_map_referenced_map which doesn't exist
337
 
                # under those circumstances. Since setting the navigation_label
338
 
                # is inessential, just accept this and go on.
339
 
                who = ''
 
338
            who = get_participant_from_event(db, handle)
340
339
            desc = obj.get_description()
341
340
            label = obj.get_type()
342
341
            if desc: