Commit 280370c7 authored by Jérome Perrin's avatar Jérome Perrin

random: fix password recipe when using storage-path and passwd

As discussed on nexedi/slapos@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 )
parent e7e8cfd7
Pipeline #37612 failed with stage
in 0 seconds