示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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)