SuperUserBot/utils.py

15 lines
405 B
Python
Raw Normal View History

2024-04-28 17:18:06 +02:00
def datawrite(func):
def wrapper(self, *args, **kwargs):
result = func(self, *args, **kwargs)
self.export()
return result
return wrapper
def mutex(*args_, **kwargs_):
def w1(func):
def wrapper(self, *args, **kwargs):
with kwargs_["lock"]:
val = func(self, *args, **kwargs)
return val
return wrapper
return w1