New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1396 bad png path #1556

Merged
merged 4 commits into from Sep 23, 2015

Conversation

Projects
None yet
3 participants
@doutriaux1
Member

doutriaux1 commented Sep 18, 2015

No description provided.

@@ -4812,6 +4812,9 @@ def png(self, file, width=None, height=None,
a.plot(array)
a.png('example') # Overwrite a png file
"""
base = os.path.dirname(file)
if base!="" and not os.path.exists(base):
raise vcsError("Output path: %s does not exists" % base)

This comment has been minimized.

@durack1

durack1 Sep 18, 2015

Member

@doutriaux1 "does not exists" -> "does not exist"

@@ -4812,6 +4812,9 @@ def png(self, file, width=None, height=None,
a.plot(array)
a.png('example') # Overwrite a png file
"""
base = os.path.dirname(file)
if base != "" and not os.path.exists(base):
raise vcsError("Output path: %s does not exists" % base)

This comment has been minimized.

@durack1

durack1 Sep 18, 2015

Member

@doutriaux1 "does not exists" -> "does not exist"

doutriaux1 and others added some commits Sep 18, 2015

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented on abab644 Sep 18, 2015

je ne parle pas anglais desole. Merci monsieur @durack1 d'avoir corriger ceci pour moi.

This comment has been minimized.

Member

durack1 replied Sep 18, 2015

Mon plaisir @doutriaux1, mon français est plutôt défraîchi si heureux de simplifier les choses où je peux ..

@@ -4812,6 +4812,9 @@ def png(self, file, width=None, height=None,
a.plot(array)
a.png('example') # Overwrite a png file
"""
base = os.path.dirname(file)

This comment has been minimized.

@aashish24

aashish24 Sep 19, 2015

Contributor

Why not put this block of code in try catch instead of checking of the file exists? In general thats a better practice

This comment has been minimized.

@doutriaux1

doutriaux1 Sep 19, 2015

Member

Because it does not fail, that is actually the issue.

This comment has been minimized.

@doutriaux1

doutriaux1 Sep 21, 2015

Member

@aashish24 are you suggesting we create the subdirectory?

This comment has been minimized.

@aashish24

aashish24 Sep 23, 2015

Contributor

No, I was not.

@@ -4812,6 +4812,9 @@ def png(self, file, width=None, height=None,
a.plot(array)
a.png('example') # Overwrite a png file
"""
base = os.path.dirname(file)
if base != "" and not os.path.exists(base):
raise vcsError("Output path: %s does not exist" % base)
return self.backend.png(

This comment has been minimized.

@aashish24

aashish24 Sep 22, 2015

Contributor

Do you mean that backend.png does not throw an exception or any other error/

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Sep 23, 2015

LGTM 👍

aashish24 added a commit that referenced this pull request Sep 23, 2015

@aashish24 aashish24 merged commit 2ff0ff5 into master Sep 23, 2015

5 of 7 checks passed

cont-int/LLNL/Linux-annie Ubuntu 14.04 (FULL/MESA) running 'ctest -j15 -D Experimental' (Fri Sep 18 18:55:22 2015)
Details
cont-int/LLNL/Linux-crunchy RH6 (FULL) running 'ctest -j12 -D Experimental' (Fri Sep 18 17:33:52 2015)
Details
cont-int/LLNL/Darwin-Mac 10.10.3 running 'ctest -j4 -D Experimental' (Fri Sep 18 21:12:28 2015)
Details
cont-int/LLNL/Linux-oceanonly RH6 (MESA/NOGUI) running 'ctest -j12 -D Experimental' (Fri Sep 18 15:36:12 2015)
Details
continuous-integration/kitware-buildbot/uvcdat-garant-linux-release/ Build done.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@aashish24 aashish24 deleted the issue_1396_bad_png_path branch Sep 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment