Ask Solem 8 years ago
parent
commit
a2849a5b06
2 changed files with 3 additions and 6 deletions
  1. 2 5
      celery/result.py
  2. 1 1
      t/unit/utils/test_saferepr.py

+ 2 - 5
celery/result.py

@@ -869,12 +869,9 @@ class GroupResult(ResultSet):
     @classmethod
     def restore(cls, id, backend=None, app=None):
         """Restore previously saved group result."""
-
         app = app or cls.app
-
-        return (
-            backend or (app.backend if app else current_app.backend)
-        ).restore_group(id)
+        backend = backend or (app.backend if app else current_app.backend)
+        return backend.restore_group(id)
 
 
 @Thenable.register

+ 1 - 1
t/unit/utils/test_saferepr.py

@@ -230,5 +230,5 @@ class test_saferepr:
                 raise KeyError('foo')
         assert 'Unrepresentable' in saferepr(O())
 
-    def test_bytes_with_unicode(self):
+    def test_bytes_with_unicode_py2_and_3(self):
         assert saferepr([b'foo', 'a®rgs'.encode('utf-8')])