Skip to content

Commit

Permalink
fix: ensure args is not empty before trying to read it.
Browse files Browse the repository at this point in the history
  • Loading branch information
lpm0073 committed Feb 21, 2025
1 parent e30c9e6 commit 9a38369
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion secure_logger/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def wrapper(*args, **kwargs):
name_of_class = func.__name__
else:
# case 2: a class method
if inspect.isclass(args[0]):
if len(args) > 0 and inspect.isclass(args[0]):
cls = args[0].__class__
name_of_module = cls.__module__
name_of_class = cls.__name__ + "()"
Expand Down

0 comments on commit 9a38369

Please sign in to comment.