Loading ccserver/conf.py +18 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ class CCConf(object): def __init__(self, path_directory): self._path = path_directory self._lock = threading.Lock() self._lock = threading.RLock() def _writer(func): ''' Loading Loading @@ -111,6 +111,23 @@ class CCConf(object): else: raise CCConf.UnknownAccount('%s is not a file' % filename) def acquire(self): ''' Acquire the configuration writing lock for non-atomic configuration changes. .. warning:: Don't forget to call the :meth:`release` method after your changes for each :meth:`acquire` you made. ''' self._lock.acquire() def release(self): ''' Release the configuration writing lock. ''' self._lock.release() def show(self, login): ''' Show the configuration for specified account. Loading Loading
ccserver/conf.py +18 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ class CCConf(object): def __init__(self, path_directory): self._path = path_directory self._lock = threading.Lock() self._lock = threading.RLock() def _writer(func): ''' Loading Loading @@ -111,6 +111,23 @@ class CCConf(object): else: raise CCConf.UnknownAccount('%s is not a file' % filename) def acquire(self): ''' Acquire the configuration writing lock for non-atomic configuration changes. .. warning:: Don't forget to call the :meth:`release` method after your changes for each :meth:`acquire` you made. ''' self._lock.acquire() def release(self): ''' Release the configuration writing lock. ''' self._lock.release() def show(self, login): ''' Show the configuration for specified account. Loading