[yt-svn] commit/yt: 3 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Jun 1 10:17:45 PDT 2015
3 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/eacd99fba124/
Changeset: eacd99fba124
Branch: yt
User: ngoldbaum
Date: 2015-05-24 17:29:24+00:00
Summary: Avoid raising error in plot_container.save when output directory exists
Affected #: 1 file
diff -r c12349973350b9c9b2f4c60af9a7bc6b90ea42e2 -r eacd99fba124b4142240cbec812fbd378389deb8 yt/visualization/plot_container.py
--- a/yt/visualization/plot_container.py
+++ b/yt/visualization/plot_container.py
@@ -536,7 +536,13 @@
name = str(self.ds)
name = os.path.expanduser(name)
if name[-1] == os.sep and not os.path.isdir(name):
- os.mkdir(name)
+ try:
+ os.mkdir(name)
+ except OSError as e:
+ if e.errno == 17:
+ pass
+ else:
+ raise
if os.path.isdir(name) and name != str(self.ds):
name = name + (os.sep if name[-1] != os.sep else '') + str(self.ds)
if suffix is None:
https://bitbucket.org/yt_analysis/yt/commits/04dcc222ac74/
Changeset: 04dcc222ac74
Branch: yt
User: ngoldbaum
Date: 2015-06-01 16:30:49+00:00
Summary: Use errno module instead of hard-coded error code
Affected #: 1 file
diff -r eacd99fba124b4142240cbec812fbd378389deb8 -r 04dcc222ac74a67c1482f8129ea8505f7659bacb yt/visualization/plot_container.py
--- a/yt/visualization/plot_container.py
+++ b/yt/visualization/plot_container.py
@@ -14,7 +14,9 @@
#-----------------------------------------------------------------------------
from yt.extern.six.moves import builtins
from yt.extern.six import iteritems
+
import base64
+import errno
import numpy as np
import matplotlib
import os
@@ -539,7 +541,7 @@
try:
os.mkdir(name)
except OSError as e:
- if e.errno == 17:
+ if e.errno == errno.EEXIST:
pass
else:
raise
https://bitbucket.org/yt_analysis/yt/commits/239abe7c09fe/
Changeset: 239abe7c09fe
Branch: yt
User: xarthisius
Date: 2015-06-01 17:17:36+00:00
Summary: Merged in ngoldbaum/yt (pull request #1599)
Avoid raising error in plot_container.save when output directory exists
Affected #: 1 file
diff -r 1dee4eb0634354c90ace1ba14a6d2b4ed4237882 -r 239abe7c09fe6680691383eddb189965fe6522fe yt/visualization/plot_container.py
--- a/yt/visualization/plot_container.py
+++ b/yt/visualization/plot_container.py
@@ -14,7 +14,9 @@
#-----------------------------------------------------------------------------
from yt.extern.six.moves import builtins
from yt.extern.six import iteritems
+
import base64
+import errno
import numpy as np
import matplotlib
import os
@@ -536,7 +538,13 @@
name = str(self.ds)
name = os.path.expanduser(name)
if name[-1] == os.sep and not os.path.isdir(name):
- os.mkdir(name)
+ try:
+ os.mkdir(name)
+ except OSError as e:
+ if e.errno == errno.EEXIST:
+ pass
+ else:
+ raise
if os.path.isdir(name) and name != str(self.ds):
name = name + (os.sep if name[-1] != os.sep else '') + str(self.ds)
if suffix is None:
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list