Beispiel #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)
Beispiel #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)
Beispiel #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)