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 706883 Details for
Bug 919284
fluxbox-xdg-menu script prematurely ends with an encoding exception
[?]
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]
Correction of the script utf8 handling
correct_utf8.patch (text/plain), 2.79 KB, created by
Jacobo Cabaleiro
on 2013-03-08 00:54:22 UTC
(
hide
)
Description:
Correction of the script utf8 handling
Filename:
MIME Type:
Creator:
Jacobo Cabaleiro
Created:
2013-03-08 00:54:22 UTC
Size:
2.79 KB
patch
obsolete
>Index: fluxbox-xdg-menu.py >=================================================================== >--- fluxbox-xdg-menu.py (revision 13) >+++ fluxbox-xdg-menu.py (working copy) >@@ -34,7 +34,7 @@ > __license__ = "GPL" > > >-import os,re,sys,glob,getopt >+import codecs,getopt,glob,locale,os,re,sys > import xdg.Menu,xdg.DesktopEntry,xdg.IconTheme > from os.path import isfile > >@@ -44,6 +44,7 @@ > def header(wm="fluxbox"): > return """ > [begin] (Fluxbox) >+[encoding] {UTF-8} > [exec] (Web Browser) {htmlview} > [exec] (Email) {evolution} > [exec] (Terminal) {$TERM} >@@ -81,6 +82,7 @@ > [separator] > [exit] (Exit) > [end] >+[endencoding] > [end]\n""" > > def checkWm(entry, wm="fluxbox"): >@@ -98,17 +100,17 @@ > e.g. gaim --> /usr/share/pixmaps/gaim.png > e.g. fart.png --> /usr/share/pixmaps/fart.png > """ >- retval=str(xdg.IconTheme.getIconPath(icon, 48, theme,["png","xpm"])) >+ retval=xdg.IconTheme.getIconPath(icon, 48, theme,["png","xpm"]) > if retval == "None": > retval="" > >- return (retval + "").encode('utf8') >+ return retval > > def parseMenu(menu,wm,use_icons,theme,depth=1): > if use_icons: >- print "%s[submenu] (%s) <%s> " % ( (depth*"\t"), menu.getName().encode('utf8'), findIcon(menu.getIcon(), theme) ) >+ print "%s[submenu] (%s) <%s> " % ( (depth*"\t"), menu.getName(), findIcon(menu.getIcon(), theme) ) > else: >- print "%s[submenu] (%s) " % ( (depth*"\t"), menu.getName().encode('utf8'), ) >+ print "%s[submenu] (%s) " % ( (depth*"\t"), menu.getName() ) > depth += 1 > for entry in menu.getEntries(): > if isinstance(entry, xdg.Menu.Menu): >@@ -117,9 +119,9 @@ > checkWm(entry,wm) > if entry.Show == False: continue > if use_icons: >- print "%s[exec] (%s) {%s} <%s> " % ( (depth*"\t"), entry.DesktopEntry.getName().encode("utf8"), entry.DesktopEntry.getExec().split()[0], findIcon(entry.DesktopEntry.getIcon(), theme) ) >+ print "%s[exec] (%s) {%s} <%s> " % ( (depth*"\t"), entry.DesktopEntry.getName(), entry.DesktopEntry.getExec().split()[0], findIcon(entry.DesktopEntry.getIcon(), theme) ) > else: >- print "%s[exec] (%s) {%s} " % ( (depth*"\t"), entry.DesktopEntry.getName().encode("utf8"), entry.DesktopEntry.getExec().split()[0] ) >+ print "%s[exec] (%s) {%s} " % ( (depth*"\t"), entry.DesktopEntry.getName(), entry.DesktopEntry.getExec().split()[0] ) > elif isinstance(entry,xdg.Menu.Separator): > print "%s[separator]" % (depth*"\t") > elif isinstance(entry.xdg.Menu.Header): >@@ -189,7 +191,7 @@ > use_bg = False > bg_Xpath = False > theme = "gnome" >- lang = os.getenv("LANG","C") >+ lang, coding = locale.getdefaultlocale() > file = os.path.expanduser("~/.fluxbox/menu") > do_submenu = False > use_stdout = False >@@ -233,7 +235,7 @@ > do_submenu = True > > if not use_stdout: >- fsock = open(file,'w') >+ fsock = codecs.open(file,mode='w',encoding='UTF-8') > saveout = sys.stdout > sys.stdout = fsock >
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 919284
: 706883