def _mk_lockfile(self):
        'TODO: not implemented'
        lockfile = self._filename + '.lock'
        try:
            if self.exists():
                os.link(self._filename, lockfile)
            else:
                os.mkdir(lockfile)
        except __HOLE__ as err:
            if err.errno == 17:
                msg = ("The file '%s' is locked by another process.\n"
                       "If this process is not running, "
                       "you can manually remove the lockfile\n\trm '%s'" % (self._filename, lockfile))
                raise errors.ChalmersError(msg)
            raise
dataset/ETHPy150Open Anaconda-Platform/chalmers/chalmers/utils/persistent_dict.py/PersistentDict._mk_lockfile