From 671b6e2a751322ceb19b324041c78d856ec53d26 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Tue, 6 Oct 2015 22:50:37 +0200 Subject: Support Python 3 This enables support for Python 3 together with Python 2 support with a single codebase. On Python 3 key data is passed around as bytestrings which makes the doctests a little harder to maintain across Python versions. --- pskc/encryption.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pskc/encryption.py') diff --git a/pskc/encryption.py b/pskc/encryption.py index a9324e6..4911662 100644 --- a/pskc/encryption.py +++ b/pskc/encryption.py @@ -30,7 +30,7 @@ The encryption key can be derived using the KeyDerivation class. def unpad(value): """Remove padding from the plaintext.""" - return value[0:-ord(value[-1])] + return value[0:-ord(value[-1:])] class EncryptedValue(object): -- cgit v1.2.3