Skip to content

Commit

Permalink
avoid File exists when running processes in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
landam committed May 31, 2024
1 parent 8ca7526 commit dcc5cae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions smoderp2d/runners/grass.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def create_location(self, epsg):

# path to temp location
gisdb = os.path.join(tempfile.gettempdir(), 'grassdata')
if not os.path.isdir(gisdb):
os.mkdir(gisdb)
os.makedirs(gisdb, exist_ok=True)

# location: use random names for batch jobs
string_length = 16
location = binascii.hexlify(os.urandom(string_length)).decode("utf-8")
Expand Down

0 comments on commit dcc5cae

Please sign in to comment.