mirror of
https://github.com/boltgolt/howdy.git
synced 2024-09-19 09:51:19 +02:00
Merge pull request #736 from jezek/beta-pam_python3-pam
Add pam_python3 support and use updated config variable names
This commit is contained in:
commit
8eefb6825f
3 changed files with 11 additions and 7 deletions
|
@ -88,6 +88,10 @@ if "upgrade" in sys.argv:
|
|||
key = "abort_if_ssh"
|
||||
if key == "ignore_closed_lid":
|
||||
key = "abort_if_lid_closed"
|
||||
if key == "capture_failed":
|
||||
key = "save_failed"
|
||||
if key == "capture_successful":
|
||||
key = "save_successful"
|
||||
|
||||
try:
|
||||
newConf.set(section, key, value)
|
||||
|
|
|
@ -150,8 +150,8 @@ timeout = config.getint("video", "timeout", fallback=5)
|
|||
dark_threshold = config.getfloat("video", "dark_threshold", fallback=50.0)
|
||||
video_certainty = config.getfloat("video", "certainty", fallback=3.5) / 10
|
||||
end_report = config.getboolean("debug", "end_report", fallback=False)
|
||||
capture_failed = config.getboolean("snapshots", "capture_failed", fallback=False)
|
||||
capture_successful = config.getboolean("snapshots", "capture_successful", fallback=False)
|
||||
save_failed = config.getboolean("snapshots", "save_failed", fallback=False)
|
||||
save_successful = config.getboolean("snapshots", "save_successful", fallback=False)
|
||||
gtk_stdout = config.getboolean("debug", "gtk_stdout", fallback=False)
|
||||
rotate = config.getint("video", "rotate", fallback=0)
|
||||
|
||||
|
@ -236,7 +236,7 @@ while True:
|
|||
# Stop if we've exceeded the time limit
|
||||
if time.time() - timings["fr"] > timeout:
|
||||
# Create a timeout snapshot if enabled
|
||||
if capture_failed:
|
||||
if save_failed:
|
||||
make_snapshot(_("FAILED"))
|
||||
|
||||
if dark_tries == valid_frames:
|
||||
|
@ -251,7 +251,7 @@ while True:
|
|||
gsframe = clahe.apply(gsframe)
|
||||
|
||||
# If snapshots have been turned on
|
||||
if capture_failed or capture_successful:
|
||||
if save_failed or save_successful:
|
||||
# Start capturing frames for the snapshot
|
||||
if len(snapframes) < 3:
|
||||
snapframes.append(frame)
|
||||
|
@ -362,7 +362,7 @@ while True:
|
|||
print(_("Winning model: %d (\"%s\")") % (match_index, models[match_index]["label"]))
|
||||
|
||||
# Make snapshot if enabled
|
||||
if capture_successful:
|
||||
if save_successful:
|
||||
make_snapshot(_("SUCCESSFUL"))
|
||||
|
||||
# Run rubberstamps if enabled
|
||||
|
|
|
@ -144,7 +144,7 @@ auto check_enabled(const INIReader &config) -> int {
|
|||
}
|
||||
|
||||
// Stop if we're in a remote shell and configured to exit
|
||||
if (config.GetBoolean("core", "ignore_ssh", true)) {
|
||||
if (config.GetBoolean("core", "abort_if_ssh", true)) {
|
||||
if (getenv("SSH_CONNECTION") != nullptr ||
|
||||
getenv("SSH_CLIENT") != nullptr || getenv("SSHD_OPTS") != nullptr) {
|
||||
syslog(LOG_INFO, "Skipped authentication, SSH session detected");
|
||||
|
@ -153,7 +153,7 @@ auto check_enabled(const INIReader &config) -> int {
|
|||
}
|
||||
|
||||
// Try to detect the laptop lid state and stop if it's closed
|
||||
if (config.GetBoolean("core", "ignore_closed_lid", true)) {
|
||||
if (config.GetBoolean("core", "abort_if_lid_closed", true)) {
|
||||
glob_t glob_result;
|
||||
|
||||
// Get any files containing lid state
|
||||
|
|
Loading…
Reference in a new issue