Skip to content

Commit

Permalink
use mkdtemp to create cache directory to avoid clashes from multiple …
Browse files Browse the repository at this point in the history
…suds users
  • Loading branch information
Henrik Thostrup Jensen committed Nov 12, 2012
1 parent 4f5326e commit dda4370
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions suds/cache.py
Expand Up @@ -20,7 +20,7 @@

import os
import suds
from tempfile import gettempdir as tmp
from tempfile import mkdtemp
from suds.transport import *
from suds.sax.parser import Parser
from suds.sax.element import Element
Expand Down Expand Up @@ -138,7 +138,7 @@ def __init__(self, location=None, **duration):
@type duration: {unit:value}
"""
if location is None:
location = os.path.join(tmp(), 'suds')
location = mkdtemp(prefix='suds_')
self.location = location
self.duration = (None, 0)
self.setduration(**duration)
Expand Down

0 comments on commit dda4370

Please sign in to comment.