• Jérome Perrin's avatar
    random: fix password recipe when using storage-path and passwd · 280370c7
    Jérome Perrin authored
    As discussed on bb841a7b (comment 219278)
    when using storage-path and passwd option, the storage file could not
    be updated to the new format because of AttributeError _needs_migration.
    
    This changes to no longer try to detect if the storage needs migration,
    but just compare the expected content of the storage file during install
    and overwrite the file if it is different.
    
    This new approach also fix a behavior that re-running buildout with
    storage-path option and a different passwd option did not update the
    storage file. Now it is also updated.
    
    ( this also fixes a potential encoding problem on py2 )
    280370c7
test_random.py 8 KB