Skip to content

Commit 9a38369

Browse files
committed
fix: ensure args is not empty before trying to read it.
1 parent e30c9e6 commit 9a38369

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

secure_logger/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def wrapper(*args, **kwargs):
5151
name_of_class = func.__name__
5252
else:
5353
# case 2: a class method
54-
if inspect.isclass(args[0]):
54+
if len(args) > 0 and inspect.isclass(args[0]):
5555
cls = args[0].__class__
5656
name_of_module = cls.__module__
5757
name_of_class = cls.__name__ + "()"

0 commit comments

Comments
 (0)