diff options
Diffstat (limited to '')
-rwxr-xr-x | lang/python/examples/howto/export-secret-keys.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lang/python/examples/howto/export-secret-keys.py b/lang/python/examples/howto/export-secret-keys.py index 7203ded9..0f4d8ee4 100755 --- a/lang/python/examples/howto/export-secret-keys.py +++ b/lang/python/examples/howto/export-secret-keys.py @@ -90,7 +90,10 @@ else: process = subprocess.Popen(gpgconfcmd.split(), stdout=subprocess.PIPE) procom = process.communicate() - hd = procom[0].decode().strip() + if sys.version_info[0] == 2: + hd = procom[0].strip() + else: + hd = procom[0].decode().strip() gpgfile = "{0}/{1}.gpg".format(hd, keyfile) ascfile = "{0}/{1}.asc".format(hd, keyfile) |