From c0d1f3f7ef3135df950994e9f6f86ca7dcfb7f0f Mon Sep 17 00:00:00 2001 From: uweschmitt Date: Thu, 7 Aug 2014 17:17:05 +0200 Subject: [PATCH] even better fix as replacement for last commit which was wrong --- _pytest/capture.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_pytest/capture.py b/_pytest/capture.py index 8bcb49377..f27ab1a74 100644 --- a/_pytest/capture.py +++ b/_pytest/capture.py @@ -240,9 +240,9 @@ class EncodedFile(object): def __getattr__(self, name): return getattr(self.buffer, name) - def __setattr__(self, dd): - """default implementation for __setattr__ because unpickling causes infinite - recursion if only __getattr__ is overloaded and __setattr__ is missing""" + 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