def generateNoDataPlot(fileName, data, metadata): try: fn = file(fileName, "wb") except: return S_ERROR("Can't open %s" % fileName) textGraph('No data for this selection', fn, metadata) fn.close() return S_OK()
def generateNoDataPlot( fileName, data, metadata ): try: fn = file( fileName, "wb" ) except: return S_ERROR( "Can't open %s" % fileName ) text = "No data for this selection for the plot: %s" % metadata['title'] textGraph( text, fn, metadata ) fn.close() return S_OK()
def generateErrorMessagePlot(msgText): """ It creates a plot whith a specific error message :param str msgText the text which will appear on the plot. :return the plot. """ fn = cStringIO.StringIO() textGraph(msgText, fn, {}) data = fn.getvalue() fn.close() return S_OK(data)
def generateErrorMessagePlot( msgText ): """ It creates a plot whith a specific error message :param str msgText the text which will appear on the plot. :return the plot. """ fn = cStringIO.StringIO() textGraph( msgText, fn, {} ) data = fn.getvalue() fn.close() return S_OK( data )
def generateNoDataPlot( fileName, data, metadata ): """ Tis generate an image with a specific error message. :param str fileName name of the file :param list data data :param dict metadata metadata information """ try: with open( fileName, "wb" ) as fn: text = "No data for this selection for the plot: %s" % metadata['title'] textGraph( text, fn, metadata ) except IOError as e: return S_ERROR( errno.EIO, e ) return S_OK()
def generateNoDataPlot(fileName, data, metadata): """ Tis generate an image with a specific error message. :param str fileName name of the file :param list data data :param dict metadata metadata information """ try: with open(fileName, "wb") as fn: text = "No data for this selection for the plot: %s" % metadata[ 'title'] textGraph(text, fn, metadata) except IOError as e: return S_ERROR(errno.EIO, e) return S_OK()
def generateErrorMessagePlot( msgText ): fn = cStringIO.StringIO() textGraph( msgText, fn, {} ) data = fn.getvalue() fn.close() return S_OK( data )