Skip to content

Commit

Permalink
Avoid a logger write exception
Browse files Browse the repository at this point in the history
  • Loading branch information
yimelia committed Nov 7, 2023
1 parent e875bb8 commit e2002b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion airtest/utils/logwraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,9 @@ def func1(snapshot=True):
# if G.DEVICE is None
pass
logger.log('function', fndata, depth=depth)
logger.running_stack.pop()
try:
logger.running_stack.pop()
except IndexError:
# logger.running_stack is empty
pass
return wrapper

0 comments on commit e2002b2

Please sign in to comment.