[Moin-user] IOError on SystemInfo

Fujio Nobori toh at fuji-climb.org
Fri Feb 13 03:58:02 EST 2004


Hello,

I am using recent MoinMoin from moin--main--1.2.tar.gz and
encountered an IOError when viewing SystemInfo page.

This happens if you haven't edited any pages, which means
that you can reproduce this issue if you try to view
SystemInfo page just after the installation.

Well, the problem is that logfile/logfile.py tries to read
the editlog file which doesn't exist yet.

To solve this issue, I modified logfile.py as follows:

    131c131,134
    <         return os.path.getsize(self.__filename)
    ---
    >         try:
    >             return os.path.getsize(self.__filename)
    >         except:
    >             return 0
    139,144c142,150
    <         f = open(self.__filename, 'r')
    <         i = 0
    <         for line in f:
    <             i += 1
    <         f.close()
    <         return i
    ---
    >         try:
    >             f = open(self.__filename, 'r')
    >             i = 0
    >             for line in f:
    >                 i += 1
    >             f.close()
    >             return i
    >         except:
    >             return 0

I am not bright enough to know that this is the right
solution, but I am reporting now anyway.

Thank you very much.

-- 
Fujio Nobori                                     il|li
    email: toh at fuji-climb.org                   q|@.@|p
                                              m. ( o ) .m
                                             ~~~~~~~~~~~~~
PGP-Key
    http://pgp.nic.ad.jp:11371/pks/lookup?op=get&search=0xC1BDBC10
    C3DA 7318 32F4 49F6 9D23  C686 3B83 231F C1BD BC10






More information about the Moin-user mailing list