From 212a846d8cb657ac0c583c39a43fa18ddcb2b055 Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Sat, 16 Apr 2011 08:52:28 -0400 Subject: [PATCH] libsaria: Cache removes path if it exists I wasn't checking if the path exists before removing it, and this caused an error. Checking before removing is simple enough, though... --- libsaria/path/cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libsaria/path/cache.py b/libsaria/path/cache.py index 55c33768..1e8d0f97 100644 --- a/libsaria/path/cache.py +++ b/libsaria/path/cache.py @@ -30,7 +30,8 @@ class CacheObject: if success: return path else: - rm(path) + if exists(path): + rm(path) else: return path