Skip to content

Commit

Permalink
billiard.einfo.Frame: add f_back attribute (#257)
Browse files Browse the repository at this point in the history
Standard Python frame objects have a `f_back` attribute, which is used
in places such as the Django AdminEmailHandler. The lack of this
attribute in the billiard Frame causes a crash when celery is used in
Django apps, configured to use Django logging, and AdminEmailHandler is
in use. See for example Django bug #27543:

https://code.djangoproject.com/ticket/27543

In general, this also makes the billiard Frame object more compatible
with any code that handles frames, and could be using `f_back`.
  • Loading branch information
terceiro authored and thedrow committed Nov 1, 2018
1 parent af85146 commit 06faccf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions billiard/einfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def __init__(self, frame):
fl["__traceback_hide__"] = frame.f_locals["__traceback_hide__"]
except KeyError:
pass
self.f_back = None
self.f_trace = None
self.f_exc_traceback = None
self.f_exc_type = None
Expand Down

0 comments on commit 06faccf

Please sign in to comment.