[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: repoview & templates in Fedora site

On Fri, 2007-10-26 at 13:33 -0400, Konstantin Ryabitsev wrote:
> On 10/25/07, Fernando Lopez-Lezcano <nando 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
 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

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]