Mercurial > repos > peterjc > seq_select_by_id
changeset 8:8e1a90917fa7 draft
v0.0.13 Python 3 compatible exception handling
author | peterjc |
---|---|
date | Wed, 17 May 2017 09:23:03 -0400 |
parents | a5602454b0ad |
children | 3b0a14722175 |
files | tools/seq_select_by_id/README.rst tools/seq_select_by_id/seq_select_by_id.py tools/seq_select_by_id/seq_select_by_id.xml tools/seq_select_by_id/tool_dependencies.xml |
diffstat | 4 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/seq_select_by_id/README.rst Thu May 11 06:26:05 2017 -0400 +++ b/tools/seq_select_by_id/README.rst Wed May 17 09:23:03 2017 -0400 @@ -89,6 +89,7 @@ - Use ``<command detect_errors="aggressive">`` (internal change only). - Depends on Biopython 1.67 via legacy Tool Shed package or bioconda. - Python 3 compatible print function. +v0.0.13 - Python 3 compatible exception handling. ======= ======================================================================
--- a/tools/seq_select_by_id/seq_select_by_id.py Thu May 11 06:26:05 2017 -0400 +++ b/tools/seq_select_by_id/seq_select_by_id.py Wed May 17 09:23:03 2017 -0400 @@ -26,7 +26,7 @@ import sys if "-v" in sys.argv or "--version" in sys.argv: - print("v0.0.12") + print("v0.0.13") sys.exit(0) # Parse Command Line @@ -118,12 +118,12 @@ iterator = (records[name] for name in parse_ids(tabular_file, column)) try: count = writer.write_file(iterator) - except KeyError, err: + except KeyError: out_handle.close() if name not in records: sys.exit("Identifier %r not found in sequence file" % name) else: - raise err + raise out_handle.close() else: # Avoid overhead of parsing into SeqRecord objects,
--- a/tools/seq_select_by_id/seq_select_by_id.xml Thu May 11 06:26:05 2017 -0400 +++ b/tools/seq_select_by_id/seq_select_by_id.xml Wed May 17 09:23:03 2017 -0400 @@ -1,4 +1,4 @@ -<tool id="seq_select_by_id" name="Select sequences by ID" version="0.0.12"> +<tool id="seq_select_by_id" name="Select sequences by ID" version="0.0.13"> <description>from a tabular file</description> <requirements> <requirement type="package" version="1.67">biopython</requirement>
--- a/tools/seq_select_by_id/tool_dependencies.xml Thu May 11 06:26:05 2017 -0400 +++ b/tools/seq_select_by_id/tool_dependencies.xml Wed May 17 09:23:03 2017 -0400 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <tool_dependency> <package name="biopython" version="1.67"> - <repository changeset_revision="a42f244cce44" name="package_biopython_1_67" owner="biopython" toolshed="https://toolshed.g2.bx.psu.edu" /> + <repository changeset_revision="a12f73c3b116" name="package_biopython_1_67" owner="biopython" toolshed="https://toolshed.g2.bx.psu.edu" /> </package> </tool_dependency>