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=920cc77ed26707a0d92f9e436121b61d84bde627;hpb=8ab946e230447a6fe686edabc5e3cfa445da1721 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.