Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/raw-rev/5f9c14e679c1
Дата изменения: Unknown
Дата индексирования: Sun Feb 3 01:59:09 2013
Кодировка:

# HG changeset patch
# User Boris Nagaev
# Date 1356088025 -14400
# Node ID 5f9c14e679c186c15598f21a6d0efe73a58a294b
# Parent 835b55bfc6b2417ba10f1001a6afb7365a68d34f
pair_cores: add error messages to rethrown exceptions

diff -r 835b55bfc6b2 -r 5f9c14e679c1 pair_cores/pair_cores.py
--- a/pair_cores/pair_cores.py Fri Dec 21 15:04:53 2012 +0400
+++ b/pair_cores/pair_cores.py Fri Dec 21 15:07:05 2012 +0400
@@ -54,7 +54,7 @@
alignment = Alignment().append_file(input_file, format=input_file_format)
except Exception, e:
raise Exception("Can not read input file %s (%s: %s)" % \
- (input_file, e.__class__, e))
+ (input_file, e.__class__, e.message))
unique_sequence_names = set([s.name for s in alignment.sequences])
if len(unique_sequence_names) != len(alignment.sequences):
raise Exception("Duplicate sequence names in %s" % input_file)
@@ -66,7 +66,7 @@
sequence.auto_pdb(pdb_getter=pdb_getter, read_local=read_local)
except Exception, e:
raise Exception("Can't load structure for sequence %s from file %s (%s: %s)" % \
- (sequence.name, input_file, e.__class__, e))
+ (sequence.name, input_file, e.__class__, e.message))
if len(alignment.sequences) < 2:
raise Exception("Alignment from file %s has too few sequences" % input_file)
block = Block.from_alignment(alignment)