SF.net SVN: gar:[23436] csw/mgar/gar/v2/bin/chkdbcat

guengel at users.sourceforge.net guengel at users.sourceforge.net
Sun Apr 20 13:55:54 CEST 2014


Revision: 23436
          http://sourceforge.net/p/gar/code/23436
Author:   guengel
Date:     2014-04-20 11:55:53 +0000 (Sun, 20 Apr 2014)
Log Message:
-----------
bin/chkdbcat: add help strings to cmd line args. Make use of changes in r23434.

Revision Links:
--------------
    http://sourceforge.net/p/gar/code/23434

Modified Paths:
--------------
    csw/mgar/gar/v2/bin/chkdbcat

Modified: csw/mgar/gar/v2/bin/chkdbcat
===================================================================
--- csw/mgar/gar/v2/bin/chkdbcat	2014-04-20 11:54:23 UTC (rev 23435)
+++ csw/mgar/gar/v2/bin/chkdbcat	2014-04-20 11:55:53 UTC (rev 23436)
@@ -4,7 +4,6 @@
 import argparse
 import logging
 from lib.python import chkdbcat
-import smtplib
 
 class MyCheckDBCatalog(chkdbcat.CheckDBCatalog):
     """Class overriding CheckDBCatalog.notify()"""
@@ -12,23 +11,32 @@
         super(MyCheckDBCatalog,self).__init__(catrel, arch, osrel, fn_ts, gencat_bin, chkcat)
         self.__verbose = verbose
 
-    def notify(self, date, addr, pkginfo):
+    def notify_broken(self, date, addr, pkginfo):
         notifier = chkdbcat.InformMaintainer((self._catrel, self._osrel, self._arch),
-                                             date, addr, pkginfo))
-        notfier.send_mail()
+                                             date, addr, pkginfo)
+        notfier.send_mail_broken()
 
+    def notify_unbroken(self, date, addr):
+        notifier = chkdbcat.InformMaintainer((self._catrel, self._osrel, self._arch),
+                                             date, addr, pkginfo)
+        notfier.send_mail_unbroken()
 
+
 def argparser():
     parser = argparse.ArgumentParser(description='Check Database Catalog.')
     parser.add_argument('--debug', help='enable debug output', required=False, default=False, action='store_const', const=True)
     parser.add_argument('--verbose', help='be verbose', required=False, default=False, action='store_const', const=True)
-    parser.add_argument('--arch', required=True)
-    parser.add_argument('--catalog-release', required=True)
-    parser.add_argument('--os-release', required=True)
+    parser.add_argument('--arch', required=True,
+                        help="i386, sparc")
+    parser.add_argument('--catalog-release', required=True,
+                        help="unstable, kiel, etc.")
+    parser.add_argument('--os-release', required=True,
+                        help="SunOS5.10, SunOS5.11")
     parser.add_argument('--timestamp-file', default='/var/cache/chkdbcat/timestamp.json')
     parser.add_argument('--chkcat-path', default='/opt/csw/bin/chkcat')
     parser.add_argument('--gen-catalog-path',
-                        help="Path to gen-catalog-index")
+                        help="path to gen-catalog-index",
+                        default="/home/web/bin/gen-catalog-index")
     return parser.parse_args()
 
 def main():

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