diff --git a/gpgfs.py b/gpgfs.py index 06306e0..03feb3a 100755 --- a/gpgfs.py +++ b/gpgfs.py @@ -25,6 +25,7 @@ def decrypt(gpg, path): if not res.ok: raise IOError, "decryption failed, %s" % path data = zlib.decompress(res.data) + log.debug('decrypted %s' % path) return data def encrypt(gpg, keyid, path, data): @@ -34,6 +35,7 @@ def encrypt(gpg, keyid, path, data): raise IOError, "encryption failed, keyid %s, path %s" % (keyid, path) with file(path, 'w') as fd: fd.write(res.data) + log.debug('encrypted %s' % path) class Entry: ''' @@ -79,7 +81,7 @@ def write_dict(fd, dct): elif isinstance(val, Entry): buf.write('E') children.append(val) - elif isinstance(val, int): + elif isinstance(val, (int, long)): buf.write('I') buf.write(struct.pack('