We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe678ba commit b0e3676Copy full SHA for b0e3676
suds/cache.py
@@ -30,6 +30,7 @@
30
import cPickle as pickle
31
except:
32
import pickle
33
+import shutil
34
35
log = getLogger(__name__)
36
@@ -321,7 +322,11 @@ def __remove_default_location():
321
322
323
"""
324
if FileCache.remove_default_location_on_exit:
- import shutil
325
+ # We must not load shutil here on-demand as under some
326
+ # circumstances this may cause the shutil.rmtree() operation to
327
+ # fail due to not having some internal module loaded. E.g. this
328
+ # happens if you run the project's test suite using the setup.py
329
+ # test command on Python 2.4.x.
330
shutil.rmtree(FileCache.__default_location, ignore_errors=True)
331
332
0 commit comments