From 7d5fa50ca473f6c4336b80ca365e2d1270b9136f Mon Sep 17 00:00:00 2001 From: Scott Maxwell Date: Sat, 2 Nov 2013 20:20:09 -0700 Subject: [PATCH] More type conversions --- paramiko/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paramiko/util.py b/paramiko/util.py index b2ac3f5..51fa6d6 100644 --- a/paramiko/util.py +++ b/paramiko/util.py @@ -285,10 +285,10 @@ class Counter (object): # start with value - 1 so we don't have to store intermediate values when counting # could the iv be 0? if initial_value == 0: - self.value = array.array('c', '\xFF' * self.blocksize) + self.value = array.array('c', max_byte * self.blocksize) else: x = deflate_long(initial_value - 1, add_sign_padding=False) - self.value = array.array('c', '\x00' * (self.blocksize - len(x)) + x) + self.value = array.array('c', zero_byte * (self.blocksize - len(x)) + x) def __call__(self): """Increament the counter and return the new value"""