Bug 202918 - A potential bug (typo) in up2date/wrapper.py
A potential bug (typo) in up2date/wrapper.py
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: up2date (Show other bugs)
4.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Shannon Hughes
Red Hat Satellite QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-17 03:26 EDT by Satoru SATOH
Modified: 2012-06-20 12:05 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 12:05:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Satoru SATOH 2006-08-17 03:26:51 EDT
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-11 21:06:46 EDT
User bnackash@redhat.com's account has been closed
Comment 2 Jiri Pallich 2012-06-20 12:05:45 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.