def unlock(self, path): if not self.islocked(path): self.app.notice("is not locked:", path.path); return False; if not path.inroot(): self.app.warning("is not in root:", path.path); return False; self.DB.remove(path.relativepath()); self.changed = True; self.removed = True;
def lock(self, path): if self.islocked(path): self.app.notice("is already locked:", path.path); return False; if self.parentislocked(path): self.app.notice("is already locked (parent):", path.path); return False; if not path.inroot(): self.app.warning("is not in root:", path.path); return False; self.DB_NEWS.append(path.relativepath() + "\n"); self.changed = True;