[python] Fix broken patch.

This commit is contained in:
Kris Maglione 2010-07-10 22:35:31 -04:00
parent 05e71d0715
commit 31f49d1c2a

View File

@ -24,7 +24,7 @@ class Int(Field):
if n not in cls.encoders: if n not in cls.encoders:
exec ('def enc(n):\n' + exec ('def enc(n):\n' +
' assert n == n & 0x%s, "Arithmetic overflow"\n' + ' assert n == n & 0x%s, "Arithmetic overflow"\n' +
' return ''.join((%s,))' ' return "".join((%s,))'
) % ('ff' * n, ) % ('ff' * n,
','.join('chr((n >> %d) & 0xff)' % (i * 8) ','.join('chr((n >> %d) & 0xff)' % (i * 8)
for i in range(0, n))) for i in range(0, n)))