changeset 103:86bcf17f50ef

improve warning messages
author Jan Kanis <jan.code@jankanis.nl>
date Tue, 01 Jul 2014 17:18:09 +0200
parents 87c5402e0ba8
children a22c909c9b57
files blast2html.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/blast2html.py	Tue Jul 01 16:54:32 2014 +0200
+++ b/blast2html.py	Tue Jul 01 17:18:09 2014 +0200
@@ -399,7 +399,10 @@
         except OSError:
             continue
     if not links:
-        warnings.warn("No gene bank link templates found in {0}".format(', '.join(files)))
+        if not files:
+            warnings.warn("No gene bank link templates found (no blastdb*.loc files found in {0})".format(dir))
+        else:
+            warnings.warn("No gene bank link templates found in {0}".format(', '.join(files)))
     return links