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 )
Showing
Please register or sign in to comment