From: Mike Jackson Date: Tue, 2 Apr 2013 16:49:55 +0000 (-0700) Subject: Added KeyError check X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e01c72d66eed4b6aeb34d530aa0ebb2a5c9a89a6;p=swc-testing-nose.git Added KeyError check --- diff --git a/testing/cdna.py b/testing/cdna.py index 6fdfeca..a1f7e03 100755 --- a/testing/cdna.py +++ b/testing/cdna.py @@ -13,4 +13,6 @@ def complement(sequence): cdna += COMPLEMENTS[ch] return cdna except TypeError: - print 'The input is not a sequence e.g. a string or list' + raise ValueError('The input is not a sequence e.g. a string or list') + except KeyError: + raise ValueError('The input is not a sequence of G,T,C,A')