Update severity of messages to upstream/dev
This commit is contained in:
commit
11a8633f3d
3 changed files with 8 additions and 8 deletions
|
|
@ -183,7 +183,7 @@ try:
|
||||||
|
|
||||||
# Delay the frame if slowmode is on
|
# Delay the frame if slowmode is on
|
||||||
if slow_mode:
|
if slow_mode:
|
||||||
time.sleep(.5 - frame_time)
|
time.sleep(max([.5 - frame_time, 0.0]))
|
||||||
|
|
||||||
if exposure != -1:
|
if exposure != -1:
|
||||||
# For a strange reason on some cameras (e.g. Lenoxo X1E)
|
# For a strange reason on some cameras (e.g. Lenoxo X1E)
|
||||||
|
|
|
||||||
|
|
@ -291,5 +291,5 @@ while True:
|
||||||
# are captured and even after a delay it does not
|
# are captured and even after a delay it does not
|
||||||
# always work. Setting exposure at every frame is
|
# always work. Setting exposure at every frame is
|
||||||
# reliable though.
|
# reliable though.
|
||||||
video_capture.intenal.set(cv2.CAP_PROP_AUTO_EXPOSURE, 1.0) # 1 = Manual
|
video_capture.internal.set(cv2.CAP_PROP_AUTO_EXPOSURE, 1.0) # 1 = Manual
|
||||||
video_capture.intenal.set(cv2.CAP_PROP_EXPOSURE, float(exposure))
|
video_capture.internal.set(cv2.CAP_PROP_EXPOSURE, float(exposure))
|
||||||
|
|
|
||||||
10
src/pam.py
10
src/pam.py
|
|
@ -48,26 +48,26 @@ def doAuth(pamh):
|
||||||
if not config.getboolean("core", "suppress_unknown"):
|
if not config.getboolean("core", "suppress_unknown"):
|
||||||
pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "No face model known"))
|
pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "No face model known"))
|
||||||
|
|
||||||
syslog.syslog(syslog.LOG_ERR, "Failure, no face model known")
|
syslog.syslog(syslog.LOG_NOTICE, "Failure, no face model known")
|
||||||
syslog.closelog()
|
syslog.closelog()
|
||||||
return pamh.PAM_USER_UNKNOWN
|
return pamh.PAM_USER_UNKNOWN
|
||||||
|
|
||||||
# Status 11 means we exceded the maximum retry count
|
# Status 11 means we exceded the maximum retry count
|
||||||
elif status == 11:
|
elif status == 11:
|
||||||
pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "Face detection timeout reached"))
|
pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "Face detection timeout reached"))
|
||||||
syslog.syslog(syslog.LOG_WARNING, "Failure, timeout reached")
|
syslog.syslog(syslog.LOG_INFO, "Failure, timeout reached")
|
||||||
syslog.closelog()
|
syslog.closelog()
|
||||||
return pamh.PAM_AUTH_ERR
|
return pamh.PAM_AUTH_ERR
|
||||||
|
|
||||||
# Status 12 means we aborted
|
# Status 12 means we aborted
|
||||||
elif status == 12:
|
elif status == 12:
|
||||||
syslog.syslog(syslog.LOG_ERR, "Failure, general abort")
|
syslog.syslog(syslog.LOG_INFO, "Failure, general abort")
|
||||||
syslog.closelog()
|
syslog.closelog()
|
||||||
return pamh.PAM_AUTH_ERR
|
return pamh.PAM_AUTH_ERR
|
||||||
|
|
||||||
# Status 13 means the image was too dark
|
# Status 13 means the image was too dark
|
||||||
elif status == 13:
|
elif status == 13:
|
||||||
syslog.syslog(syslog.LOG_WARNING, "Failure, image too dark")
|
syslog.syslog(syslog.LOG_INFO, "Failure, image too dark")
|
||||||
syslog.closelog()
|
syslog.closelog()
|
||||||
pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "Face detection image too dark"))
|
pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "Face detection image too dark"))
|
||||||
return pamh.PAM_AUTH_ERR
|
return pamh.PAM_AUTH_ERR
|
||||||
|
|
@ -83,7 +83,7 @@ def doAuth(pamh):
|
||||||
|
|
||||||
# Otherwise, we can't discribe what happend but it wasn't successful
|
# Otherwise, we can't discribe what happend but it wasn't successful
|
||||||
pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "Unknown error: " + str(status)))
|
pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "Unknown error: " + str(status)))
|
||||||
syslog.syslog(syslog.LOG_ERR, "Failure, unknown error" + str(status))
|
syslog.syslog(syslog.LOG_INFO, "Failure, unknown error" + str(status))
|
||||||
syslog.closelog()
|
syslog.closelog()
|
||||||
return pamh.PAM_SYSTEM_ERR
|
return pamh.PAM_SYSTEM_ERR
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue