Bug 202918

Summary: A potential bug (typo) in up2date/wrapper.py
Product: Red Hat Enterprise Linux 4 Reporter: Satoru SATOH <ssato>
Component: up2dateAssignee: Shannon Hughes <shughes>
Status: CLOSED WONTFIX QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 16:05:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Satoru SATOH 2006-08-17 07:26:51 UTC
Description of problem:
There are the lines in up2date/wrapper.py (up2date-4.4.69):

-------------------------------------------------:X-------------
def getPackages(filenames, source=None):
    ...
    for packages in packages:
        try:
            up2date.getPackage(packages,
                               msgCallback = wrapperUtils.printit,
                               progressCallback = wrapperUtils.percent,
                               onlySource = source)
        except up2dateErrors.FileNotFoundError, e:
            print e
            continue
    ...
-------------------------------------------------:X-------------

I guess the former "packages" should be a typo and fixed like this:

-------------------------------------------------:X-------------------------
--- up2date-4.4.69_wrapper.py.org       2006-08-17 16:00:33.000000000 +0900
+++ up2date-4.4.69_wrapper.py   2006-08-17 16:02:22.000000000 +0900
@@ -1060,9 +1060,9 @@
         else:
             missingPackages.append(filename)
 
-    for packages in packages:
+    for pkg in packages:
         try:
-            up2date.getPackage(packages,
+            up2date.getPackage(pkg,
                                msgCallback = wrapperUtils.printit,
                                progressCallback = wrapperUtils.percent,
                                onlySource = source)
-------------------------------------------------:X-------------------------


Version-Release number of selected component (if applicable):
up2date-4.4.69

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

The loop variable does not look loop-local in python.

$ python
Python 2.4.3 (#1, Jul 21 2006, 08:46:09) 
[GCC 4.1.1 20060718 (Red Hat 4.1.1-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> ns=range(0,3)
>>> print ns
[0, 1, 2]
>>> for ns in ns: sys.stdout.write("%d, " % ns)
... 
0, 1, 2, >>> print ns
2
>>>

Comment 1 Red Hat Bugzilla 2007-04-12 01:06:46 UTC
User bnackash's account has been closed

Comment 2 Jiri Pallich 2012-06-20 16:05:45 UTC
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.