Update calls to passwordy.random_hex.

This commit is contained in:
voussoir 2022-01-09 17:08:56 -08:00
parent 043505f80a
commit 622632ce35
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB
3 changed files with 3 additions and 3 deletions

View file

@ -299,7 +299,7 @@ def git_show_commit(commit):
check_call(command)
def git_stash_push():
token = passwordy.urandom_hex(32)
token = passwordy.random_hex(32)
command = [GIT, 'stash', 'push', '--include-untracked', '--message', token]
output = check_output(command)

View file

@ -42,7 +42,7 @@ def sole_lift_argparse(args):
# child is renamed to random hex so that the grandchildren we are about
# to lift don't have name conflicts with the child dir itself.
# Consider .\abc\abc where the grandchild can't be moved.
temp_dir = directory.with_child(passwordy.urandom_hex(32))
temp_dir = directory.with_child(passwordy.random_hex(32))
os.rename(child, temp_dir)
for grandchild in temp_dir.listdir():
shutil.move(grandchild, directory)

View file

@ -44,7 +44,7 @@ def loop_once(extension, regex=None):
if regex and not re.search(regex, text):
return
path = pathclass.Path(passwordy.urandom_hex(12)).add_extension(extension)
path = pathclass.Path(passwordy.random_hex(12)).add_extension(extension)
pyperclip.copy('')
pipeable.stdout(f'{path.basename} {text}')
path.write('w', text, encoding='utf-8')