diff options
author | Ben McGinnes <[email protected]> | 2018-12-05 14:50:52 +0000 |
---|---|---|
committer | Ben McGinnes <[email protected]> | 2018-12-05 14:50:52 +0000 |
commit | dc5600d306f808767068bad5117232fc3d35ac43 (patch) | |
tree | cf30c1648d73aed25ae258c04d9dd8086b70ef73 /lang/python/examples/howto/send-key-to-keyserver.py | |
parent | python: windows c and cython (diff) | |
download | gpgme-dc5600d306f808767068bad5117232fc3d35ac43.tar.gz gpgme-dc5600d306f808767068bad5117232fc3d35ac43.zip |
python: examples
* cut some of then poor len usage.
Diffstat (limited to 'lang/python/examples/howto/send-key-to-keyserver.py')
-rwxr-xr-x | lang/python/examples/howto/send-key-to-keyserver.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lang/python/examples/howto/send-key-to-keyserver.py b/lang/python/examples/howto/send-key-to-keyserver.py index d72ca9f1..cb17e804 100755 --- a/lang/python/examples/howto/send-key-to-keyserver.py +++ b/lang/python/examples/howto/send-key-to-keyserver.py @@ -49,7 +49,7 @@ else: logrus = input("Enter the UID matching the key(s) to export: ") homedir = input("Enter the GPG configuration directory path (optional): ") -if len(homedir) == 0: +if not homedir: homedir = None elif homedir.startswith("~"): userdir = os.path.expanduser(homedir) @@ -73,7 +73,7 @@ if homedir is not None: else: pass -if len(logrus) > 0: +if logrus: try: export_result = c.key_export(pattern=logrus) except Exception as e: |