def console_error_callback(error, userdata): if error == lib.kSpErrorLoginBadCredentials: print("Invalid username or password") # sys.exit() doesn't work inside of a ffi callback C.exit(1) else: error_callback(msg)
def console_error_callback(error, userdata): if error == lib.kSpErrorLoginBadCredentials: print 'Invalid username or password' #sys.exit() doesn't work inside of a ffi callback C.exit(1) else: error_callback(msg)
def console_error_callback(msg): if int(msg) == lib.kSpErrorLoginBadCredentials: print 'Invalid username or password' #sys.exit() doesn't work inside of a ffi callback C.exit(1) else: error_callback(msg)