Skip to content
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

Use contextmanager when using compression_util.get_fileobj() #4270

Merged
merged 3 commits into from Jul 3, 2017

Conversation

Projects
None yet
3 participants
@mvdbeek
Copy link
Member

commented Jun 30, 2017

No description provided.

break
if count > 0:
return True
except Exception:
pass

This comment has been minimized.

Copy link
@nsoranzo

nsoranzo Jul 3, 2017

Member

You can remove the external try/except, exceptions in a sniffer are already caught in galaxy.datatypes.sniff.guess_ext() and are equivalent to the following return False.

This comment has been minimized.

Copy link
@mvdbeek

mvdbeek Jul 3, 2017

Author Member

So then I can also remove the inner try/except, right?

mvdbeek added some commits Jul 3, 2017

Remove outer try/except in Eland sniffer
Exceptions in a sniffer are already caught in
galaxy.datatypes.sniff.guess_ext() and are equivalent to `return False`.
Thanks @nsoranzo!

@nsoranzo nsoranzo merged commit ee62fa7 into galaxyproject:dev Jul 3, 2017

5 checks passed

api test Build finished. 279 tests run, 0 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 150 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 34 tests run, 0 skipped, 0 failed.
Details
toolshed test Build finished. 579 tests run, 0 skipped, 0 failed.
Details
@nsoranzo

This comment has been minimized.

Copy link
Member

commented Jul 3, 2017

Thanks @mvdbeek!

@mvdbeek mvdbeek deleted the mvdbeek:context_manager_get_fileobj branch Jun 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.