Bug 968496 - Unhandled python exception in reposync when an invalid repoid is specified
Unhandled python exception in reposync when an invalid repoid is specified
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-utils (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Valentina Mukhamedzhanova
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-29 15:22 EDT by Maru Newby
Modified: 2015-10-12 11:08 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-12 11:08:02 EDT
Type: Bug
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 Maru Newby 2013-05-29 15:22:01 EDT
Description of problem:

Invoking reposync with an invalid repoid results in an unhandled python exception.

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

1.1.30-14.el6

How reproducible:

reposync --repoid=badrepoid


Actual results:

Traceback (most recent call last):
  File "/usr/bin/reposync", line 352, in <module>
    main()
  File "/usr/bin/reposync", line 349, in main
    sys.exit(exit_code)
UnboundLocalError: local variable 'exit_code' referenced before assignment

Expected results:

Either an error or a warning indicating that the repoid is not valid.

Additional info:

The exit_code variable is referenced on line 349 (sys.exit(exit_code)) but is not guaranteed to be defined if an invalid repo is specified.
Comment 2 Zdeněk Pavlas 2013-05-30 05:11:24 EDT
commit 6d3a95c63f3f000473f147bad230979fae00d029
Author: Zdeněk Pavlas <zpavlas@redhat.com>
Date:   Mon Dec 3 09:01:59 2012 +0100

    Initialize exit_code correctly.  BZ 882536
Comment 3 RHEL Product and Program Management 2013-10-13 19:32:32 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 4 Karel Srot 2015-10-12 11:08:02 EDT
This bug is already fixed.

# reposync --repoid=badrepoid
# rpm -q yum-utils
yum-utils-1.1.30-30.el6.noarch

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