[python-sybase] Errors and warnings

Marcos Sánchez Provencio rapto at arrakis.es
24 Feb 2003 16:52:00 +0100

I have changed _servermsg_cb to ignore non-errors, since I was getting a

    raise DatabaseError(_fmt_server(msg))
 DatabaseError: Msg 8153, State 1, Procedure usp_VsIntervinientes, Line
Warning: Null value eliminated from aggregate.

This is the new version:

def _servermsg_cb(ctx, conn, msg):
    print '_servermsg_cb:',msg.severity,msg.line, msg.msgnumber,
msg.proc, msg.severity, msg.state, msg.status, msg.svrname,msg.text
    #if msg.msgnumber not in (5701, 5703):
    if msg.severity:
        raise DatabaseError(_fmt_server(msg))

Is it too permissive?

Marcos Sánchez Provencio <rapto@arrakis.es>