Skip to content

Commit

Permalink
ubuntu-22.04 fix: NoneType object has no attribute getcurrent()
Browse files Browse the repository at this point in the history
related issue: eventlet#953
  • Loading branch information
farshan-dev committed Apr 4, 2024
1 parent c22b896 commit 62f1e79
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions eventlet/green/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ def _count():


def get_ident(gr=None):
if gr is None:
return id(greenlet.getcurrent())
else:
try:
if gr is None:
return id(greenlet.getcurrent())
else:
return id(gr)
except:
return id(gr)


Expand Down

0 comments on commit 62f1e79

Please sign in to comment.