示例#1
0
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()
示例#2
0
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()
示例#3
0
文件: Plots.py 项目: vingar/DIRAC
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)
示例#4
0
文件: Plots.py 项目: DIRACGrid/DIRAC
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 )
示例#5
0
文件: Plots.py 项目: DIRACGrid/DIRAC
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()
示例#6
0
文件: Plots.py 项目: vingar/DIRAC
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()
示例#7
0
def generateErrorMessagePlot( msgText ):
  fn = cStringIO.StringIO()
  textGraph( msgText, fn, {} )
  data = fn.getvalue()
  fn.close()
  return S_OK( data )