[yum-cvs] yum cli.py,1.184,1.185

Menno Smits mjs at login.linux.duke.edu
Mon Jun 27 12:23:23 UTC 2005


Update of /home/groups/yum/cvs/yum
In directory login:/tmp/cvs-serv17283

Modified Files:
	cli.py 
Log Message:
Cleanup and clarification of _filtercmdline()


Index: cli.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/cli.py,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -r1.184 -r1.185
--- cli.py	27 Jun 2005 03:19:02 -0000	1.184
+++ cli.py	27 Jun 2005 12:23:21 -0000	1.185
@@ -1519,15 +1519,16 @@
             if len(args) < 1:
                 raise ValueError
             next = args.pop(0)
-            if next[0] == '-':
+            if next.startswith('-'):
                 raise ValueError
 
             out.extend([a, next])
-            continue 
-        
-        for opt in valopts:
-            if a.startswith(opt):
-                out.append(a)
-                
+       
+        else:
+            # Check for single letter options that take an option where the
+            # value right up against the option
+            for opt in valopts:
+                if len(opt) == 2 and a.startswith(opt):
+                    out.append(a)
 
     return out




More information about the Yum-cvs-commits mailing list