[git] GPGME - branch, master, updated. gpgme-1.11.1-306-g7c9f49a

by Ben McGinnes cvs at cvs.gnupg.org
Thu Sep 27 01:58:59 CEST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  7c9f49a4991c1ccd0cb582875207b373d4fccf50 (commit)
      from  b625258d54782040195cc5ad3b255685af6f6c4e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7c9f49a4991c1ccd0cb582875207b373d4fccf50
Author: Ben McGinnes <ben at adversary.org>
Date:   Thu Sep 27 09:57:50 2018 +1000

    examples: python bindings
    
    * Fixed homedir specifying logic in several cases.

diff --git a/lang/python/examples/howto/export-key.py b/lang/python/examples/howto/export-key.py
index c17f247..ff3345a 100755
--- a/lang/python/examples/howto/export-key.py
+++ b/lang/python/examples/howto/export-key.py
@@ -62,9 +62,9 @@ elif homedir.startswith("~"):
 else:
     homedir = os.path.realpath(homedir)
 
-if os.path.exists(homedir) is False:
+if homedir is not None and os.path.exists(homedir) is False:
     homedir = None
-else:
+elif homedir is not None and os.path.exists(homedir) is True:
     if os.path.isdir(homedir) is False:
         homedir = None
     else:
diff --git a/lang/python/examples/howto/export-minimised-key.py b/lang/python/examples/howto/export-minimised-key.py
index a5a453c..ffd7524 100755
--- a/lang/python/examples/howto/export-minimised-key.py
+++ b/lang/python/examples/howto/export-minimised-key.py
@@ -62,9 +62,9 @@ elif homedir.startswith("~"):
 else:
     homedir = os.path.realpath(homedir)
 
-if os.path.exists(homedir) is False:
+if homedir is not None and os.path.exists(homedir) is False:
     homedir = None
-else:
+elif homedir is not None and os.path.exists(homedir) is True:
     if os.path.isdir(homedir) is False:
         homedir = None
     else:
diff --git a/lang/python/examples/howto/export-secret-key.py b/lang/python/examples/howto/export-secret-key.py
index e7d4e3a..af1aa70 100755
--- a/lang/python/examples/howto/export-secret-key.py
+++ b/lang/python/examples/howto/export-secret-key.py
@@ -65,9 +65,9 @@ elif homedir.startswith("~"):
 else:
     homedir = os.path.realpath(homedir)
 
-if os.path.exists(homedir) is False:
+if homedir is not None and os.path.exists(homedir) is False:
     homedir = None
-else:
+elif homedir is not None and os.path.exists(homedir) is True:
     if os.path.isdir(homedir) is False:
         homedir = None
     else:
diff --git a/lang/python/examples/howto/export-secret-keys.py b/lang/python/examples/howto/export-secret-keys.py
index f0fddc6..f4e5008 100755
--- a/lang/python/examples/howto/export-secret-keys.py
+++ b/lang/python/examples/howto/export-secret-keys.py
@@ -74,9 +74,9 @@ elif homedir.startswith("~"):
 else:
     homedir = os.path.realpath(homedir)
 
-if os.path.exists(homedir) is False:
+if homedir is not None and os.path.exists(homedir) is False:
     homedir = None
-else:
+elif homedir is not None and os.path.exists(homedir) is True:
     if os.path.isdir(homedir) is False:
         homedir = None
     else:
diff --git a/lang/python/examples/howto/send-key-to-keyserver.py b/lang/python/examples/howto/send-key-to-keyserver.py
index 3541b19..261c8b6 100755
--- a/lang/python/examples/howto/send-key-to-keyserver.py
+++ b/lang/python/examples/howto/send-key-to-keyserver.py
@@ -60,9 +60,9 @@ elif homedir.startswith("~"):
 else:
     homedir = os.path.realpath(homedir)
 
-if os.path.exists(homedir) is False:
+if homedir is not None and os.path.exists(homedir) is False:
     homedir = None
-else:
+elif homedir is not None and os.path.exists(homedir) is True:
     if os.path.isdir(homedir) is False:
         homedir = None
     else:

-----------------------------------------------------------------------

Summary of changes:
 lang/python/examples/howto/export-key.py            | 4 ++--
 lang/python/examples/howto/export-minimised-key.py  | 4 ++--
 lang/python/examples/howto/export-secret-key.py     | 4 ++--
 lang/python/examples/howto/export-secret-keys.py    | 4 ++--
 lang/python/examples/howto/send-key-to-keyserver.py | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list