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

GPGBase: Do not set a default pubring/secring #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions pretty_bad_protocol/_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,19 @@ def __init__(self, binary=None, home=None, keyring=None, secring=None,
self.ignore_homedir_permissions = ignore_homedir_permissions
self.binary = _util._find_binary(binary)
self.homedir = os.path.expanduser(home) if home else _util._conf
pub = _parsers._fix_unsafe(keyring) if keyring else 'pubring.gpg'
sec = _parsers._fix_unsafe(secring) if secring else 'secring.gpg'
self.keyring = os.path.join(self._homedir, pub)
self.secring = os.path.join(self._homedir, sec)

if keyring:
pub = _parsers._fix_unsafe(keyring)
self.keyring = os.path.join(self._homedir, pub)
else:
self.keyring = None

if secring:
sec = _parsers._fix_unsafe(secring)
self.secring = os.path.join(self._homedir, sec)
else:
self.secring = None

self.options = list(_parsers._sanitise_list(options)) if options else None

#: The version string of our GnuPG binary
Expand Down