Skip to content

Commit

Permalink
fix event sender info (#860)
Browse files Browse the repository at this point in the history
Co-authored-by: noO0ob <[email protected]>
  • Loading branch information
noO0oOo0ob and noO0ob authored Jun 6, 2024
1 parent 9aee2e9 commit aa198bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lyrebird/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def run(self):
class EventServer(ThreadServer):

async_starting = False
publish_trace_deep = 3

def __init__(self, no_start = False):
super().__init__()
Expand Down Expand Up @@ -333,9 +334,9 @@ def get_publish_message(channel, message, event_id=None):

# Add event sender
stack = inspect.stack()
script_path = stack[2].filename
script_path = stack[EventServer.publish_trace_deep].filename
script_name = script_path[script_path.rfind('/') + 1:]
function_name = stack[2].function
function_name = stack[EventServer.publish_trace_deep].function
sender_dict = {
"file": script_name,
"function": function_name
Expand Down
2 changes: 1 addition & 1 deletion lyrebird/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
IVERSION = (3, 0, 2)
IVERSION = (3, 0, 3)
VERSION = ".".join(str(i) for i in IVERSION)
LYREBIRD = "Lyrebird " + VERSION

0 comments on commit aa198bc

Please sign in to comment.