From bd1c68c94f0d5bc25b48f62c7527f51c754f2b6b Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 24 Oct 2007 18:55:37 +0000 Subject: Patch #1303: Adapt str8 constructor to bytes (now buffer) one. --- Lib/struct.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/struct.py') diff --git a/Lib/struct.py b/Lib/struct.py index 027caa258b..10085b713e 100644 --- a/Lib/struct.py +++ b/Lib/struct.py @@ -36,7 +36,7 @@ from _struct import Struct as _Struct, error class Struct(_Struct): def __init__(self, fmt): if isinstance(fmt, str): - fmt = str8(fmt) + fmt = str8(fmt, 'latin1') _Struct.__init__(self, fmt) _MAXCACHE = 100 -- cgit v1.2.1