include **kwargs
@@ -440,16 +440,16 @@ class LightkurveWarning(Warning):
pass
-def suppress_stdout(f, *args):
+def suppress_stdout(f, *args, **kwargs):
"""A simple decorator to suppress function print outputs."""
@wraps(f)
- def wrapper(*args):
+ def wrapper(*args, **kwargs):
# redirect output to `null`
with open(os.devnull, 'w') as devnull:
old_out = sys.stdout
sys.stdout = devnull
try:
- return f(*args)
+ return f(*args, **kwargs)
# restore to default
finally:
sys.stdout = old_out
