Skip to content

Commit c0466a6

Browse files
committed
Fixed changing beta password
1 parent 3574d64 commit c0466a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python_password/utils/files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def generate_salt(preset=None):
3838
else:
3939
Logger.info(f'Structure: {Files.beta_key} file not found, creating it.')
4040
finally:
41-
custom_salt = os.urandom(16) if preset is None else preset
41+
custom_salt = os.urandom(16) if preset is None else preset if type(preset) is bytes else preset.encode()
4242
with open(appdata(Files.beta_key), 'wb') as f:
4343
f.write(custom_salt)
4444
Logger.info('Structure: Beta password changed.')

0 commit comments

Comments
 (0)