Red Hat Bugzilla – Bug 968496
Unhandled python exception in reposync when an invalid repoid is specified
Last modified: 2015-10-12 11:08:02 EDT
Description of problem:
Invoking reposync with an invalid repoid results in an unhandled python exception.
Version-Release number of selected component (if applicable):
Traceback (most recent call last):
File "/usr/bin/reposync", line 352, in <module>
File "/usr/bin/reposync", line 349, in main
UnboundLocalError: local variable 'exit_code' referenced before assignment
Either an error or a warning indicating that the repoid is not valid.
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.
Author: Zdeněk Pavlas <email@example.com>
Date: Mon Dec 3 09:01:59 2012 +0100
Initialize exit_code correctly. BZ 882536
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.
This bug is already fixed.
# reposync --repoid=badrepoid
# rpm -q yum-utils