Red Hat Bugzilla – Bug 751294
yum does not write to stderr raised exception by plugin, which inherit from YumBaseError.
Last modified: 2014-09-15 20:25:14 EDT
99% sure this will be a unicode thing ... as logger eats unicode instead of doing a Unicode exception.
Quickly searched the code.. Seems this is the only place where Yum sends to_unicode() to logger. Fixing this very likely fixes BZ 824663 too.
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 is a bug in the subclass.
def __getattr__(self, name):
if name == 'errmsg':
# >>> implicit "return None" here <<<
The Error instance is passed to the logging module which checks if the argument is a non-empty dictionary with something like: "if e and type(e) == dict".
The first test checks for the presence of __len__ method and tries to call it, raising "NoneType is not callable" error in turn. We have to make sure __len__ is not defined by raising an AttributeError in __getattr__.
Created attachment 837608 [details]
Subclass YumBaseError without defining __len__ = None.
*** Bug 996453 has been marked as a duplicate of this bug. ***
There is no direct analogue for this bug for spacewalk client tools because these Spacewalk master commits obsolete it:
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.