commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/reports/adapters destinations/email/sendma...


From: Jason Cater
Subject: gnue/reports/adapters destinations/email/sendma...
Date: Fri, 12 Apr 2002 21:54:35 -0400

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    02/04/12 21:54:35

Modified files:
        reports/adapters/destinations/email: sendmail.py 
        reports/adapters/filters/sablotron: Adapter.py 

Log message:
        fixed to destinations

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/adapters/destinations/email/sendmail.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/adapters/filters/sablotron/Adapter.py.diff?cvsroot=OldCVS&tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: gnue/reports/adapters/destinations/email/sendmail.py
diff -c gnue/reports/adapters/destinations/email/sendmail.py:1.1 
gnue/reports/adapters/destinations/email/sendmail.py:1.2
*** gnue/reports/adapters/destinations/email/sendmail.py:1.1    Thu Apr 11 
00:19:29 2002
--- gnue/reports/adapters/destinations/email/sendmail.py        Fri Apr 12 
21:54:35 2002
***************
*** 42,48 ****
  
  
  
! class DestinationAdapter(_BaseAdapter):
  
    #
    # Typically, a transform adapter will call EITHER
--- 42,48 ----
  
  
  
! class DestinationAdapter(Base):
  
    #
    # Typically, a transform adapter will call EITHER
***************
*** 71,76 ****
--- 71,78 ----
    #
    def close(self, mimetype='plain/text'):
  
+     print mimetype
+ 
      if self.usingHandle:
        self.input.close()
  
***************
*** 79,85 ****
      email_from = GConfig.get('SendmailFrom',"GNUe Reports <address@hidden>")
      email_to = string.replace(string.replace(self.destination, "`",""),';','')
  
!     sendmail = os.popen(GConfig.get('SendmailBin',"/usr/sbin/sendmail)+" 
'%s'" % email_to, 'w')
      sendmail.write("""From: %s
  To: %s
  Subject: %s
--- 81,87 ----
      email_from = GConfig.get('SendmailFrom',"GNUe Reports <address@hidden>")
      email_to = string.replace(string.replace(self.destination, "`",""),';','')
  
!     sendmail = os.popen(GConfig.get('SendmailBin',"/usr/sbin/sendmail")+" 
'%s'" % email_to, 'w')
      sendmail.write("""From: %s
  To: %s
  Subject: %s
***************
*** 115,118 ****
    'plain/text': 'txt',
    'plain/html': 'html',
    'application/pdf': 'pdf'
! }
\ No newline at end of file
--- 117,120 ----
    'plain/text': 'txt',
    'plain/html': 'html',
    'application/pdf': 'pdf'
! }
Index: gnue/reports/adapters/filters/sablotron/Adapter.py
diff -c gnue/reports/adapters/filters/sablotron/Adapter.py:1.2 
gnue/reports/adapters/filters/sablotron/Adapter.py:1.3
*** gnue/reports/adapters/filters/sablotron/Adapter.py:1.2      Fri Apr 12 
20:54:21 2002
--- gnue/reports/adapters/filters/sablotron/Adapter.py  Fri Apr 12 21:54:35 2002
***************
*** 63,70 ****
      PySablot.ProcessFiles(xslfile,self.infile,outfile)
      P = Sablot.Sablot()
  
      # Let the destination adapter do its thing
!     self.destination.close(mimetype="plain/text")
  
      # clean up our temp files
      self.deleteTempFile(self.infile)
--- 63,75 ----
      PySablot.ProcessFiles(xslfile,self.infile,outfile)
      P = Sablot.Sablot()
  
+     try:
+       mimetype = self.parameters['minetype']
+     except:
+       mimetype = 'text/plain'
+ 
      # Let the destination adapter do its thing
!     self.destination.close(mimetype=mimetype)
  
      # clean up our temp files
      self.deleteTempFile(self.infile)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]