Logo Search packages:      
Sourcecode: obnam version File versions  Download package

def obnamlib::repo::Repository::lock_root (   self )
Lock root node.

Raise obnamlib.LockFail if locking fails. Lock will be released
by commit_root() or unlock_root().

Definition at line 217 of file repo.py.

                       :
        '''Lock root node.
        
        Raise obnamlib.LockFail if locking fails. Lock will be released
        by commit_root() or unlock_root().
        
        '''

        tracing.trace('locking root')        
        self.check_format_version()
        try:
            self.fs.fs.write_file('root.lock', '')
        except OSError, e:
            if e.errno == errno.EEXIST:
                raise LockFail('Lock file root.lock already exists')
        self.got_root_lock = True
        self.added_clients = []
        self.removed_clients = []
        self._write_format_version(self.format_version)


Generated by  Doxygen 1.6.0   Back to index