# HG changeset patch # User Jan Kanis # Date 1404226298 -7200 # Node ID 5bfaa3ee1f279637ee5d09428f1304a27d60572d # Parent be7c94e29cd8ce907774c22b9183736bda8e0bf9 better warning message diff -r be7c94e29cd8 -r 5bfaa3ee1f27 blast2html.py --- a/blast2html.py Tue Jul 01 16:23:29 2014 +0200 +++ b/blast2html.py Tue Jul 01 16:51:38 2014 +0200 @@ -382,8 +382,9 @@ def read_genelinks(dir): links = {} # blastdb.loc, blastdb_p.loc, blastdb_d.loc, etc. - # sort reversed, so blastdb.loc will take precedence - for f in sorted(glob.glob(path.join(dir, 'blastdb*.loc')), reverse=True): + files = sorted(glob.glob(path.join(dir, 'blastdb*.loc'))) + # reversed, so blastdb.loc will take precedence + for f in reversed(files): try: f = open(path.join(dir, f)) for l in f.readlines(): @@ -398,7 +399,7 @@ except OSError: continue if not links: - warnings.warn("No gene bank link templates found") + warnings.warn("No gene bank link templates found in {0}".format(', '.join(files)) return links