repoview & templates in Fedora site
Fernando Lopez-Lezcano
nando at ccrma.Stanford.EDU
Sat Oct 27 00:45:07 UTC 2007
On Fri, 2007-10-26 at 13:33 -0400, Konstantin Ryabitsev wrote:
> On 10/25/07, Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> wrote:
> > I tried 0.6.1... With that one I could not see immediately how to get
> > the (small) group list to appear on the left pane of the pages
>
> That is not coming back.
:-<
That's too bad... I thought it was very useful.
> > (and I
> > had to patch it to avoid problems with non ascii characters in, for
> > example, changelog entries).
>
> Did you pass that patch upstream? :)
If it were a patch I would have, but it is (was) just a hack, and it was
applied to a build on centos5 (it may work fine on Fedora for all I
know, sorry to not have been more precise about this):
--------
--- repoview-0.6.1/repoview.py~ 2007-09-27 08:43:45.000000000 -0700
+++ repoview-0.6.1/repoview.py 2007-10-24 15:20:31.000000000 -0700
@@ -40,6 +40,9 @@
import time
import md5
+# set default encoding to utf
+sys.setappdefaultencoding('utf-8')
+
from optparse import OptionParser
from kid import Template
--------
and to work it needs something like this, that reenables changing he
default unicode python encoding at runtime, somewhere in the python
search path:
--------
#
# sitecustomize.py - saving a useful function.
# so that apps can change the default encoding
# (used by repoview 0.6.1)
#
import sys
sys.setappdefaultencoding = sys.setdefaultencoding
--------
Or perhaps it could be something that looks up the locale and changes
things accordingly (the default behavior I was seeing was that strings
were being decoded as 'ascii' and repoview would crash when hitting
characters > 128).
I'm sure there's a better way of doing the same thing...
-- Fernando
More information about the fedora-devel-list
mailing list