aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/examples/howto/export-secret-key.py
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python/examples/howto/export-secret-key.py')
-rwxr-xr-xlang/python/examples/howto/export-secret-key.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lang/python/examples/howto/export-secret-key.py b/lang/python/examples/howto/export-secret-key.py
index e7d4e3af..af1aa70a 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: