Skip to content

Commit

Permalink
Treat negative autoaccept time as "always allow"
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Jun 30, 2022
1 parent a0494a5 commit ccb83aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions splitgpg2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ def request_timer(self, name):
delay = self.timer_delay[name]
timestamp_path = self.timestamp_path(name)
if delay is not None:
if delay < 0:
self.notify('command {} automatically allowed'.format(name))
return
try:
mtime = timestamp_path.stat().st_mtime
if mtime + delay > now:
Expand Down

0 comments on commit ccb83aa

Please sign in to comment.