hopefully final fix for strange infinite recursion bug

This commit is contained in:
uweschmitt 2014-08-11 12:42:36 +02:00
parent c0d1f3f7ef
commit 5d024c7433
1 changed files with 2 additions and 6 deletions

View File

@ -238,12 +238,8 @@ class EncodedFile(object):
self.write(data)
def __getattr__(self, name):
return getattr(self.buffer, name)
def __setstate__(self, dd):
"""default implementation for __setstate__ because unpickling causes infinite
recursion if only __getattr__ is overloaded and __setstate__ is missing"""
self.__dict__ = dd
if hasattr(self, "buffer"):
return getattr(self.buffer, name)
class MultiCapture(object):