From 95fc1e243b97cddfff9afaaee09ba162079db2cc Mon Sep 17 00:00:00 2001 From: jortel Date: Tue, 7 Dec 2010 15:41:50 +0000 Subject: Fix directory checking in FileCache.clear(). --- suds/__init__.py | 2 +- suds/cache.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/suds/__init__.py b/suds/__init__.py index c8711a1..73e64e2 100644 --- a/suds/__init__.py +++ b/suds/__init__.py @@ -27,7 +27,7 @@ import sys # __version__ = '0.4.1' -__build__="(beta) R704-20101103" +__build__="(beta) R705-20101207" # # Exceptions diff --git a/suds/cache.py b/suds/cache.py index 801c23c..8043c80 100644 --- a/suds/cache.py +++ b/suds/cache.py @@ -244,11 +244,12 @@ class FileCache(Cache): def clear(self): for fn in os.listdir(self.location): - if os.path.isdir(fn): + path = os.path.join(self.location, fn) + if os.path.isdir(path): continue if fn.startswith(self.fnprefix): - log.debug('deleted: %s', fn) - os.remove(os.path.join(self.location, fn)) + os.remove(path) + log.debug('deleted: %s', path) def purge(self, id): fn = self.__fn(id) -- cgit v1.2.1