diff options
author | Justus Winter <[email protected]> | 2016-06-02 13:18:40 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-06-06 12:16:04 +0000 |
commit | ae06f7c2fe0e49baeab5a827dc38ba8c57a6404c (patch) | |
tree | db0440d851f2c3a8524715ee943c8695eb4dd9a6 | |
parent | python: Drop obsolete VCS keywords. (diff) | |
download | gpgme-ae06f7c2fe0e49baeab5a827dc38ba8c57a6404c.tar.gz gpgme-ae06f7c2fe0e49baeab5a827dc38ba8c57a6404c.zip |
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 <[email protected]>
-rw-r--r-- | lang/python/pyme/core.py | 6 | ||||
-rw-r--r-- | lang/python/tests/support.py | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lang/python/pyme/core.py b/lang/python/pyme/core.py index 8deeb90e..71c6828a 100644 --- a/lang/python/pyme/core.py +++ b/lang/python/pyme/core.py @@ -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)) diff --git a/lang/python/tests/support.py b/lang/python/tests/support.py index 99d96cf6..8bafea8b 100644 --- a/lang/python/tests/support.py +++ b/lang/python/tests/support.py @@ -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 |