Esempio n. 1
0
def __handle_lost_db_connection(t, v, tb):

    if not gmPG2.exception_is_connection_loss(v):
        return False

    gmPG2.log_pg_exception_details(v)
    gmLog2.log_stack_trace('lost connection', t, v, tb)
    wx.EndBusyCursor()
    gmLog2.flush()
    gmGuiHelpers.gm_show_error(aTitle=_('Lost connection'),
                               aMessage=_(
                                   'Since you were last working in GNUmed,\n'
                                   'your database connection timed out.\n'
                                   '\n'
                                   'This GNUmed session is now expired.\n'
                                   '\n'
                                   'You will have to close this client and\n'
                                   'restart a new GNUmed session.'))
    return True
Esempio n. 2
0
def __handle_lost_db_connection(t, v, tb):

	if not gmPG2.exception_is_connection_loss(v):
		return False

	gmPG2.log_pg_exception_details(v)
	gmLog2.log_stack_trace('lost connection', t, v, tb)
	wx.EndBusyCursor()
	gmLog2.flush()
	gmGuiHelpers.gm_show_error (
		aTitle = _('Lost connection'),
		aMessage = _(
			'Since you were last working in GNUmed,\n'
			'your database connection timed out.\n'
			'\n'
			'This GNUmed session is now expired.\n'
			'\n'
			'You will have to close this client and\n'
			'restart a new GNUmed session.'
		)
	)
	return True