Repository navigation
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #338 +/- ##
===========================================
+ Coverage 89.72% 90.35% +0.62%
===========================================
Files 32 32
Lines 2510 2684 +174
===========================================
+ Hits 2252 2425 +173
- Misses 258 259 +1
Continue to review full report at Codecov.
|
| ---------- | ||
| """ | ||
| try: | ||
| os.rmdir(tid_cache_dir) |
There was a problem hiding this comment.
why two different tries? Why not just shutil?
There was a problem hiding this comment.
Historic reasons... I changed this, and also changed this for the dataset functions.
| os.makedirs(task_cache_dir) | ||
| except (OSError, IOError): | ||
| # TODO add debug information! | ||
| pass |
There was a problem hiding this comment.
why should this pass? That seems like a severe error! (unless it already exists, but we're not testing that).
There was a problem hiding this comment.
You're right. I just changed this, also for the dataset functions.
| try: | ||
| with io.open(xml_file, encoding='utf8') as fh: | ||
| task = _create_task_from_xml(fh.read()) | ||
| task = _get_task_description(task_id) |
There was a problem hiding this comment.
I don't get why the logic changed so much here...
There was a problem hiding this comment.
To make it look like getting a dataset. Things are now in their own little functions.
There was a problem hiding this comment.
hm ok. I can try to go through the details. I mean it looks ok but I haven't looked through the details.
There was a problem hiding this comment.
The tests are passing and I just shuffled some lines, so don't think there's something weird going on here.
This PR adds a rollback if task download fails (fixes #302).