diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-05-26 16:08:00 +0200 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2013-06-16 21:17:30 +0100 |
commit | c02e2f8136e6602b8500c777dd95b33b8ae642df (patch) | |
tree | e289500b1aac64f7d3a9f28e8d6178d8eb627663 /alot/crypto.py | |
parent | 366fd116ba15231b9342e0d3f8e4cf414fb85278 (diff) |
Replace magic value in seek call with the appropriate constant
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Diffstat (limited to 'alot/crypto.py')
-rw-r--r-- | alot/crypto.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/crypto.py b/alot/crypto.py index 8b8c85c2..8346b4ec 100644 --- a/alot/crypto.py +++ b/alot/crypto.py @@ -166,7 +166,7 @@ def detached_signature_for(plaintext_str, key=None): plaintext_data = StringIO(plaintext_str) signature_data = StringIO() sigs = ctx.sign(plaintext_data, signature_data, gpgme.SIG_MODE_DETACH) - signature_data.seek(0, 0) + signature_data.seek(0, os.SEEK_SET) signature = signature_data.read() return sigs, signature @@ -186,7 +186,7 @@ def encrypt(plaintext_str, keys=None): ctx.armor = True ctx.encrypt(keys, gpgme.ENCRYPT_ALWAYS_TRUST, plaintext_data, encrypted_data) - encrypted_data.seek(0, 0) + encrypted_data.seek(0, os.SEEK_SET) encrypted = encrypted_data.read() return encrypted |