-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
[import csv] ensure directory exists before saving csv file #4829
Conversation
a093828
to
2657299
Compare
Codecov Report
@@ Coverage Diff @@
## master #4829 +/- ##
==========================================
+ Coverage 76.91% 76.93% +0.01%
==========================================
Files 44 44
Lines 8522 8531 +9
==========================================
+ Hits 6555 6563 +8
- Misses 1967 1968 +1
Continue to review full report at Codecov.
|
superset/utils.py
Outdated
try: | ||
os.makedirs(path) | ||
except OSError as exc: | ||
if exc.errno == errno.EEXIST and os.path.isdir(path): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would negate the conditions here removing the need for the pass.
d40d5b1
to
0f389a6
Compare
@john-bodley Done |
d5277f8
to
ce1eb3a
Compare
@timifasubaa if you rebase your change the CI should succeed. |
ce1eb3a
to
7192327
Compare
@john-bodley Succeeded. Ready for merge |
Some users complained of the error while uploading CSV whereby the first uploading phase fails because directory does not exist. This PR adds an extra check to ensure the directory exists before saving the csv file.
Fixes #4576