Exemplo n.º 1
0
        if stderr != '':
            more = _("The error messages it produced are shown below:")
        else:
            more = None
        mess = {'NAME':'MESSAGE','ID':'ACTION_ERROR__',
            'MESSAGE':message,
            'MORE': more,
            'DETAILS':stderr,
            'ICON':'CRITICAL',
            'FOCUS_TEXT': _('Filter program Error'),
            'TITLE':'Program Filter Error'}
        STATUS.emit('dialog-request', mess)
        log.error('Filter Program Error:{}'.format (stderr))

# For testing purposes

if __name__ == "__main__":

    from qtvcp.core import Action
    testcase = Action()

    # print status caught errors
    def mess(error,text):
        print('STATUS caught:',text)

    STATUS.connect("error", lambda w, n, d: mess(n,d))

    # test case
    testcase.SAVE_PROGRAM('hi','/../../home')