fixed crash while calling `Repository.read()` on Python 2.4
unit tests work on Python 2.4