upgradecheck upgradecheck.py,1.3,1.4

Ville Skytta (scop) fedora-extras-commits at redhat.com
Sat Jun 17 17:33:36 UTC 2006


Author: scop

Update of /cvs/fedora/upgradecheck
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4798

Modified Files:
	upgradecheck.py 
Log Message:
Add --nomail option.


Index: upgradecheck.py
===================================================================
RCS file: /cvs/fedora/upgradecheck/upgradecheck.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- upgradecheck.py	17 Jun 2006 13:01:26 -0000	1.3
+++ upgradecheck.py	17 Jun 2006 17:33:33 -0000	1.4
@@ -35,7 +35,7 @@
 dists = ('3', '4', '5', '6')
 
 def parseArgs():
-    usage = "usage: %s [-c <config file>] [-a <arch>] [-r <repoid>] [-r <repoid2>]" % sys.argv[0]
+    usage = "usage: %s [-n] [-c <config file>] [-a <arch>] [-r <repoid>] [-r <repoid2>]" % sys.argv[0]
     parser = OptionParser(usage=usage)
     parser.add_option("-c", "--config", default='/etc/yum.conf',
         help='config file to use (defaults to /etc/yum.conf)')
@@ -45,6 +45,8 @@
         help="specify a custom directory for storing/accessing yum-cache")
     parser.add_option("-q", "--quiet", default=0, action="store_true", 
                       help="quiet (no output to stderr)")
+    parser.add_option("-n", "--nomail", default=False, action="store_true",
+                      help="do not send mail, just output the results")
     (opts, args) = parser.parse_args()
     return (opts, args)
 
@@ -154,7 +156,7 @@
 
     report = "\n".join(report)
     if report:
-        if mail_to:
+        if mail_to and not opts.nomail:
             msg = MIMEText(report)
             msg["Subject"] = mail_subject
             msg["From"] = mail_from




More information about the fedora-extras-commits mailing list