From ffc900fe6ecd046a97c2b3daa83b04caea7b8284 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sun, 1 Nov 2015 08:14:47 -0800 Subject: [PATCH] Apply Python 3 futurize transform libmodernize.fixes.fix_int_long_tuple. --- zerver/lib/ccache.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zerver/lib/ccache.py b/zerver/lib/ccache.py index f78af05a10..0ea50d135c 100644 --- a/zerver/lib/ccache.py +++ b/zerver/lib/ccache.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import #!/usr/bin/env python2.7 # This file is adapted from samples/shellinabox/ssh-krb-wrapper in # https://github.com/davidben/webathena, which has the following @@ -27,6 +28,7 @@ import base64 import struct +import six # Some DER encoding stuff. Bleh. This is because the ccache contains a # DER-encoded krb5 Ticket structure, whereas Webathena deserializes @@ -48,7 +50,7 @@ def der_encode_tlv(tag, value): return chr(tag) + der_encode_length(len(value)) + value def der_encode_integer_value(val): - if not isinstance(val, (int, long)): + if not isinstance(val, six.integer_types): raise TypeError("int") # base 256, MSB first, two's complement, minimum number of octets # necessary. This has a number of annoying edge cases: