Skip to content

Commit a8834de

Browse files
emheldyasoob
authored andcommitted
Add func call to Nesting a Decorator Within a Function (#192)
'Nesting a Decorator Within a Function' code does not ever actually call the func, so this commit adds execution and returns the wrapped function result when tagged with decorator.
1 parent f2159f7 commit a8834de

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

decorators.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ us specify a logfile to output to.
354354
with open(logfile, 'a') as opened_file:
355355
# Now we log to the specified logfile
356356
opened_file.write(log_string + '\n')
357+
return func(*args, **kwargs)
357358
return wrapped_function
358359
return logging_decorator
359360

0 commit comments

Comments
 (0)