#14 Preferences file loading fix for Comix 4 SVN r202


Hi, I've been toying around with the latest SVN, and configuration loading is broken in it: you try to load the file two times, and thus the second try throws an EOFError.

Also noticed, that if there's an error unpickling the file, than you try to delete the old file while it's still open, and while that's OK for Unix-like systems, on windows it throws an error.


  • szigor

    szigor - 2008-11-04

    Patch against r202

  • Pontus Ekberg

    Pontus Ekberg - 2008-11-04


    thanks for your patch. Actually the two cPickle.load() statements are for reading two separate pickled objects in the same file. The first is just the version number (for eventual future use), and the second is the preferences dictionary. It is possible to pickle any number of objects into one file and then unpickle them in order again, using one load() per object.

    I don't know why you got an EOFError, but see if not r206 solves your problems. It uses your check to see if the file is opened before trying to remove it, but keeps both cPickle.load() statements.

  • Pontus Ekberg

    Pontus Ekberg - 2008-11-09
    • status: open --> closed-accepted

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks