Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch timeouts on import of gpg.constants #429

Closed
wants to merge 1 commit into from

Conversation

znewman01
Copy link
Contributor

Sometimes, in some systems, not pointing any fingers but Windows, just finding out that there's no gpg available takes >3 seconds.

In that case, we now just assume that there's no GPG because a binary that takes 3 seconds even to start isn't any better than no binary at all.

Fixes #428.

Signed-off-by: Zachary Newman [email protected]

Sometimes, in some systems, not pointing any fingers but Windows,
just finding out that there's no `gpg` available takes >3 seconds.

In that case, we now just assume that there's no GPG because a
binary that takes 3 seconds even to start isn't any better than no binary at all.

Fixes secure-systems-lab#428.

Signed-off-by: Zachary Newman <[email protected]>
@joshuagl
Copy link
Collaborator

CI failures are because the subprocess module isn't imported in gpg.constants. I don't know why this only fails on macOS 😕

@znewman01
Copy link
Contributor Author

Yeah, that's...bizarre. I don't think we're going to merge this (see discussion in the linked bug) but that might point to some issue in tests.

CC @adityasaky

@znewman01
Copy link
Contributor Author

Oh! The except line doesn't execute if the try succeeds. That is:

try:
    pass
except ThisExceptionDoeNotExist

will always succeed

@znewman01 znewman01 closed this Sep 22, 2022
@joshuagl
Copy link
Collaborator

Of course, that does suggest we might need more comprehensive CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checking for gpg availability sometimes times out
2 participants