From d12a8cedc1c4da1580b01991344a4a6d6b5f46ba Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Sat, 16 Nov 2013 12:02:47 -0800 Subject: [PATCH] fix python compatibility --- gkeys/lib.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gkeys/lib.py b/gkeys/lib.py index 66e27dc..80dedb6 100644 --- a/gkeys/lib.py +++ b/gkeys/lib.py @@ -16,6 +16,10 @@ with gentoo-keys specific convienience functions. ''' +# for py 2.6 compatibility +from __future__ import print_function + + import os from os.path import join as pjoin @@ -93,7 +97,7 @@ class GkeysGPG(GPG): self.set_keydir(gkey.keydir, 'recv-keys', reset=True) self.set_keyring('pubring.gpg', 'recv-keys', reset=False) if not os.path.exists(self.keydir): - os.makedirs(self.keydir, mode=0700) + os.makedirs(self.keydir, mode=0x0700) # prefer the longkeyid if available #logger.debug("LIB: add_key; keyids %s, %s" @@ -128,7 +132,7 @@ class GkeysGPG(GPG): message += "\n gkey..: %s" %(str(gkey.fingerprint)) logger.error(message) results.append(result) - print result.stderr_out + print(result.stderr_out) return results -- 2.26.2