[Yum] no commands, but some options

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

 



		Hi!

 example:
 
 $ yum -d 4
 
======== diff === cut ===
--- yum-20020719/yummain.py     Fri Jul 19 07:54:40 2002
+++ yum/yummain.py      Mon Jul 22 02:28:32 2002
@@ -39,10 +39,12 @@
         
     try:
         gopts, cmds = getopt.getopt(args, 'c:hR:e:d:y', ['help'])
+        if len(cmds) < 1:
+            errorlog(0, 'Options Error: no commands found')
+            usage()
     except getopt.error, e:
         errorlog(0, 'Options Error: %s' % e)
         usage()
-        sys.exit(1)
    
     try: 
         for o,a in gopts:
@@ -87,7 +89,6 @@
     except ValueError, e:
         errorlog(0, 'Options Error: %s' % e)
         usage()
-        sys.exit(1)
         
     return (log, errorlog, filelog, conf, cmds)
     
========

 and some clenup: usage() already do sys.exit(1)
 
-- 
		Bor.


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux