gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: jakarta-gump/python/gump nag.py
Date Mon, 13 Oct 2003 20:39:27 GMT
ajack       2003/10/13 13:39:27

  Modified:    python/gump nag.py
  Log:
  Better content of mails...
  
  Revision  Changes    Path
  1.3       +27 -0     jakarta-gump/python/gump/nag.py
  
  Index: nag.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/nag.py,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- nag.py	13 Oct 2003 18:51:20 -0000	1.2
  +++ nag.py	13 Oct 2003 20:39:26 -0000	1.3
  @@ -101,9 +101,18 @@
   def nagProject(workspace,context,module,mctxt,project,pctxt):
       """ Nag to a specific project's <nag entry """
       content=''
  +    
  +    #
  +    # Form the content...
  +    #
  +    content+="----------------------------------------------------\n"
       content+=getContent(mctxt,"Module: " + module.name + "\n")
       content+=getContent(pctxt,"Project: " + project.name + "\n"    )
  +    content+="----------------------------------------------------\n"
           
  +    #
  +    # Form and send the e-mail...
  +    #
       email=EmailMessage(workspace.prefix+':'+module.name+'/'+project.name+' '+stateName(pctxt.status),content)
       toaddr=project.nag.toaddr or workspace.email
       fromaddr=project.nag.fromaddr or workspace.email
  @@ -113,10 +122,28 @@
   def getContent(context,message=''):
       content=''
       
  +    # Optional message
       if message:
           content=message
       
  +    #
  +    # Add status (and reason)
  +    #
  +    content += "Status: " + stateName(context.status)
  +    
  +    if not context.reason == REASON_UNSET:
  +        content +=  "Reason: " + reasonString(context.reason)
  +    #
  +    # Add an info/error/etc...
  +    #
  +    for note in context.annotations:      
  +        content += (' - %s - %s' % (levelName(note.level), note.text))
  +    
  +    #
  +    # Work
  +    #
       if context.worklist:
  +        context+="\n"
           for workitem in context.worklist:
               content+=workitem.overview()+"\n"
               
  
  
  

Mime
View raw message