Skip to content

Commit

Permalink
refac: Remove unnecessary try in regen.data
Browse files Browse the repository at this point in the history
  • Loading branch information
maybe-sybr committed Jun 1, 2021
1 parent c8ebcd6 commit 9852391
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions celery/utils/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,9 @@ def __bool__(self):

@property
def data(self):
try:
if not self.__done:
self.__consumed.extend(list(self.__it))
if not self.__done:
self.__consumed.extend(list(self.__it))
self.__done = True
except StopIteration:
pass
return self.__consumed

def __repr__(self):
Expand Down

0 comments on commit 9852391

Please sign in to comment.