Skip to content

Commit

Permalink
Set a timeout on "Do you want"-prompts
Browse files Browse the repository at this point in the history
If we need too long to respond gpg thinks it's agent died and tries to
restart it. This doesn't work with split-gpg and is anyway not what we
want.

This also has the advantage that if a scripts tries to to a bunch of
operations without waiting for success all the windows can be cleaned up
by just waiting for the timeout.
  • Loading branch information
HW42 committed Dec 18, 2019
1 parent 0088868 commit efe8333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion splitgpg2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def request_timer(self, name):
short_msg,
'for the next {}s'.format(delay) if delay is not None else '')
if subprocess.call(['zenity', '--question', '--title', short_msg,
'--text', question]) != 0:
'--text', question, '--timeout', '30']) != 0:
raise Filtered

self.notify('command {} allowed'.format(name))
Expand Down

0 comments on commit efe8333

Please sign in to comment.