From: Brian Dolbec Date: Sat, 16 Nov 2013 20:02:47 +0000 (-0800) Subject: fix python compatibility X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d12a8cedc1c4da1580b01991344a4a6d6b5f46ba;p=gentoo-keys.git fix python compatibility --- 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