Python 3 fix for the format detection of results and save files.
Authored by: bugman 2012-10-02
Parent: [r17682]
Child: [r17684]