X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=pysam.git;a=blobdiff_plain;f=pysam%2F__init__.py;fp=pysam%2F__init__.py;h=f4f1138d01d537dda24976775aa1c92ed3dd5c2d;hp=8454f8e4b0739581a463484d1799ba2b2a43a1ad;hb=68c074fc81858150ca7447a88e731eec96be6378;hpb=768881ffd9d33e3c5fa00dd9ea6f488f4f0700b3 diff --git a/pysam/__init__.py b/pysam/__init__.py index 8454f8e..f4f1138 100644 --- a/pysam/__init__.py +++ b/pysam/__init__.py @@ -48,7 +48,7 @@ class SamtoolsDispatcher(object): '''execute a samtools command ''' retval, stderr, stdout = csamtools._samtools_dispatch( self.dispatch, args ) - if retval: raise SamtoolsError( "\n".join( stderr ) ) + if retval: raise SamtoolsError( 'csamtools returned with error %i: %s' % (retval, "\n".join( stderr ) )) self.stderr = stderr # samtools commands do not propagate the return code correctly. # I have thus added this patch to throw if there is output on stderr.