commit c145ca1396fb73c50c63177cfd668ee2806d9ed0 Author: Richard Hughes Date: Wed Jan 28 16:09:37 2009 +0000 yum: try harder to get some useful text when yum passes us a structure in a message. Hopefully works around fd#19781 diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py index a73ad4f..e9c5233 100755 --- a/backends/yum/yumBackend.py +++ b/backends/yum/yumBackend.py @@ -164,7 +164,15 @@ def _is_development_repo(repo): def _format_msgs(msgs): if isinstance(msgs, basestring): msgs = msgs.split('\n') - text = ";".join(msgs) + + # yum can pass us structures (!) in the message field + try: + text = ";".join(msgs) + except exceptions.TypeError, e: + text = str(msgs) + except Exception, e: + text = _format_str(traceback.format_exc()) + text = _truncate(text, 1024) text = text.replace(";Please report this error in bugzilla", "") text = text.replace("Missing Dependency: ", "")