# HG changeset patch # User paulb # Date 1181945667 0 # Node ID 1012941f7bc550f4f61f0851184e7d10242f2ce6 # Parent 75cf414b09604abb9ef266897bdc2b21269727b2 [project @ 2007-06-15 22:14:27 by paulb] Simplified repository item (session) deletion. diff -r 75cf414b0960 -r 1012941f7bc5 WebStack/Repositories/Directory.py --- a/WebStack/Repositories/Directory.py Fri Jun 15 22:13:59 2007 +0000 +++ b/WebStack/Repositories/Directory.py Fri Jun 15 22:14:27 2007 +0000 @@ -238,21 +238,8 @@ "Remove the file associated with the given 'key'." - path = self.full_path(key) - edit_path = self.edit_path(key) - if os.path.exists(path): - self.lock(key) - - if os.path.exists(edit_path): - while 1: - try: - self.remove_resource(edit_path) - except OSError: - time.sleep(self.delay) - else: - break - else: - raise KeyError, key + edit_path = self.lock(key) + self.remove_resource(edit_path) def __getitem__(self, key):