python: Initialize GPGME for the user.
* lang/python/pyme/core.py: Call 'check_version' and explain why. * lang/python/tests/support.py (init_gpgme): Drop call here. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
2055a63605
commit
ae06f7c2fe
@ -572,6 +572,12 @@ def get_protocol_name(proto):
|
||||
def check_version(version=None):
|
||||
return pygpgme.gpgme_check_version(version)
|
||||
|
||||
# check_version also makes sure that several subsystems are properly
|
||||
# initialized, and it must be run at least once before invoking any
|
||||
# other function. We do it here so that the user does not have to do
|
||||
# it unless she really wants to check for a certain version.
|
||||
check_version()
|
||||
|
||||
def engine_check_version (proto):
|
||||
try:
|
||||
errorcheck(pygpgme.gpgme_engine_check_version(proto))
|
||||
|
@ -23,7 +23,6 @@ def make_filename(name):
|
||||
return os.path.join(os.environ['top_srcdir'], 'tests', 'gpg', name)
|
||||
|
||||
def init_gpgme(proto):
|
||||
core.check_version()
|
||||
core.engine_check_version(proto)
|
||||
|
||||
verbose = int(os.environ.get('verbose', 0)) > 1
|
||||
|
Loading…
Reference in New Issue
Block a user