SF.net SVN: gar:[23345] csw/mgar/gar/v2/lib/python

guengel at users.sourceforge.net guengel at users.sourceforge.net
Sun Apr 6 10:28:06 CEST 2014


Revision: 23345
          http://sourceforge.net/p/gar/code/23345
Author:   guengel
Date:     2014-04-06 08:28:04 +0000 (Sun, 06 Apr 2014)
Log Message:
-----------
Include stdout and stderr from chkcat.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/chkdbcat.py
    csw/mgar/gar/v2/lib/python/chkdbcat_test.py

Modified: csw/mgar/gar/v2/lib/python/chkdbcat.py
===================================================================
--- csw/mgar/gar/v2/lib/python/chkdbcat.py	2014-04-06 08:16:52 UTC (rev 23344)
+++ csw/mgar/gar/v2/lib/python/chkdbcat.py	2014-04-06 08:28:04 UTC (rev 23345)
@@ -450,7 +450,7 @@
                               notifications[addr].setdefault('newpkgs', []).append(np)
 
                         for n in notifications:
-                              self.notify(notifications[n]['lastsuccessful'], n, notifications[n]['newpkgs'])
+                              self.notify(notifications[n]['lastsuccessful'], n, notifications[n]['newpkgs'], self.stdout, self.stderr)
 
             return retval
 
@@ -471,15 +471,23 @@
 
 Please check the package(s) and re-upload if necessary.
 
+Here is the output from chkcat:
+
+%s
+
+%s
+
 Your Check Database Catalog script
 
 """
 
-      def __init__(self, cat_tuple, date, addr, pkginfo):
+      def __init__(self, cat_tuple, date, addr, pkginfo, chkcat_stdout, chkcat_stderr):
             self._cat_tuple = cat_tuple
             self._date = date
             self._addr = addr
             self._pkginfo = pkginfo
+            self._chkcat_stdout = chkcat_stdout
+            self._chkcat_stderr = chkcat_stderr
 
       def _compose_mail(self, from_address):
             """Compose Mail"""
@@ -489,7 +497,8 @@
                   msg = msg + p['fullname'] + "\n"
             msg = msg + InformMaintainer.MAIL_CAT_BROKEN_FOOTER
 
-            mail = MIMEText(msg  % (self._cat_tuple + (str(self._date),)))
+            mail = MIMEText(msg % (self._cat_tuple +
+                                   (str(self._date), self._chkcat_stdout, self._chkcat_stderr)))
             mail['From'] = from_address
             mail['To'] = self._addr
             mail['Subject'] = "[chkdbcat] Database Catalog broken by recent upload"

Modified: csw/mgar/gar/v2/lib/python/chkdbcat_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/chkdbcat_test.py	2014-04-06 08:16:52 UTC (rev 23344)
+++ csw/mgar/gar/v2/lib/python/chkdbcat_test.py	2014-04-06 08:28:04 UTC (rev 23345)
@@ -241,7 +241,7 @@
                   }
             }
 
-            def notify(self, date, addr, pkginfo):
+            def notify(self, date, addr, pkginfo, chkcat_stdout, chkcat_stderr):
                   assert date == self.expected_notification_on[addr]['lastsuccessful']
 
                   if addr == "raos at opencsw.org":
@@ -255,7 +255,7 @@
                         assert p['fullname'] in self.expected_notification_on[addr]['newpkgs']
 
                   mail = InformMaintainer((self._catrel, self._osrel, self._arch),
-                                          date, addr, pkginfo)
+                                          date, addr, pkginfo, chkcat_stdout, chkcat_stderr)
                   print mail._compose_mail('TestScript')
 
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list