Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 301808 Details for
Bug 441659
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 7: ordinal not in range(128)
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix UnicodeEncodeError in yum-cli
fix_unicode_error_yum-cli.patch (text/plain), 2.87 KB, created by
HK Kim
on 2008-04-09 14:02:24 UTC
(
hide
)
Description:
Fix UnicodeEncodeError in yum-cli
Filename:
MIME Type:
Creator:
HK Kim
Created:
2008-04-09 14:02:24 UTC
Size:
2.87 KB
patch
obsolete
>diff -Naru /usr/share/yum-cli.org/output.py /usr/share/yum-cli/output.py >--- /usr/share/yum-cli.org/output.py 2008-04-08 13:38:17.000000000 +0900 >+++ /usr/share/yum-cli/output.py 2008-04-09 22:16:10.000000000 +0900 >@@ -24,6 +24,7 @@ > import gettext > import rpm > from yum.i18n import _ >+from yum.misc import to_unicode > > import re # For YumTerm > >@@ -236,7 +237,7 @@ > def failureReport(self, errobj): > """failure output for failovers from urlgrabber""" > >- self.logger.error('%s: %s', errobj.url, str(errobj.exception)) >+ self.logger.error('%s: %s', errobj.url, to_unicode(errobj.exception)) > self.logger.error(_('Trying other mirror.')) > raise errobj.exception > >@@ -253,7 +254,7 @@ > > def fmtKeyValFill(self, key, val): > """ Return a key value pair in the common two column output format. """ >- val = str(val) >+ val = to_unicode(val) > keylen = len(key) > cols = self.term.columns > nxt = ' ' * (keylen - 2) + ': ' >@@ -266,7 +267,7 @@ > return ret > > def fmtSection(self, name, fill='='): >- name = str(name) >+ name = to_unicode(name) > cols = self.term.columns - 2 > name_len = len(name) > if name_len >= (cols - 4): >@@ -759,7 +760,7 @@ > sys.stdout.flush() > > def _makefmt(self, percent, ts_current, ts_total, progress = True): >- l = len(str(ts_total)) >+ l = len(to_unicode(ts_total)) > size = "%s.%s" % (l, l) > fmt_done = "[%" + size + "s/%" + size + "s]" > done = fmt_done % (ts_current, ts_total) >diff -Naru /usr/share/yum-cli.org/yummain.py /usr/share/yum-cli/yummain.py >--- /usr/share/yum-cli.org/yummain.py 2008-04-08 13:38:17.000000000 +0900 >+++ /usr/share/yum-cli/yummain.py 2008-04-09 22:24:55.000000000 +0900 >@@ -28,6 +28,7 @@ > from yum import plugins > from yum import logginglevels > from yum.i18n import _ >+from yum.misc import to_unicode > import cli > > >@@ -53,14 +54,14 @@ > > Log the plugin's exit message if one was supplied. > ''' >- exitmsg = str(e) >+ exitmsg = to_unicode(e) > if exitmsg: > logger.warn('\n\n%s', exitmsg) > if unlock(): return 200 > return 1 > > def exFatal(e): >- logger.critical('\n\n%s', str(e)) >+ logger.critical('\n\n%s', to_unicode(e)) > if unlock(): return 200 > return 1 > >@@ -113,7 +114,7 @@ > return exPluginExit(e) > except Errors.YumBaseError, e: > result = 1 >- resultmsgs = [str(e)] >+ resultmsgs = [to_unicode(e)] > except KeyboardInterrupt: > return exUserCancel() > except IOError, e: >@@ -154,7 +155,7 @@ > return exPluginExit(e) > except Errors.YumBaseError, e: > result = 1 >- resultmsgs = [str(e)] >+ resultmsgs = [to_unicode(e)] > except KeyboardInterrupt: > return exUserCancel() > except IOError, e:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 441659
:
301808
|
301809
|
301832
|
301834
|
301835