changeset 24:a22c48f357df draft

v0.0.13 Python 3 compatible exception handling
author peterjc
date Wed, 17 May 2017 09:18:14 -0400
parents a1ef6448b35b
children 704454850cfa
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
diffstat 3 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tools/seq_select_by_id/README.rst	Thu May 11 06:25:19 2017 -0400
+++ b/tools/seq_select_by_id/README.rst	Wed May 17 09:18:14 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:25:19 2017 -0400
+++ b/tools/seq_select_by_id/seq_select_by_id.py	Wed May 17 09:18:14 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:25:19 2017 -0400
+++ b/tools/seq_select_by_id/seq_select_by_id.xml	Wed May 17 09:18:14 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>