Update calls to passwordy.random_hex.
This commit is contained in:
parent
043505f80a
commit
622632ce35
3 changed files with 3 additions and 3 deletions
|
@ -299,7 +299,7 @@ def git_show_commit(commit):
|
||||||
check_call(command)
|
check_call(command)
|
||||||
|
|
||||||
def git_stash_push():
|
def git_stash_push():
|
||||||
token = passwordy.urandom_hex(32)
|
token = passwordy.random_hex(32)
|
||||||
command = [GIT, 'stash', 'push', '--include-untracked', '--message', token]
|
command = [GIT, 'stash', 'push', '--include-untracked', '--message', token]
|
||||||
output = check_output(command)
|
output = check_output(command)
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ def sole_lift_argparse(args):
|
||||||
# child is renamed to random hex so that the grandchildren we are about
|
# 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.
|
# to lift don't have name conflicts with the child dir itself.
|
||||||
# Consider .\abc\abc where the grandchild can't be moved.
|
# 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)
|
os.rename(child, temp_dir)
|
||||||
for grandchild in temp_dir.listdir():
|
for grandchild in temp_dir.listdir():
|
||||||
shutil.move(grandchild, directory)
|
shutil.move(grandchild, directory)
|
||||||
|
|
|
@ -44,7 +44,7 @@ def loop_once(extension, regex=None):
|
||||||
if regex and not re.search(regex, text):
|
if regex and not re.search(regex, text):
|
||||||
return
|
return
|
||||||
|
|
||||||
path = pathclass.Path(passwordy.urandom_hex(12)).add_extension(extension)
|
path = pathclass.Path(passwordy.random_hex(12)).add_extension(extension)
|
||||||
pyperclip.copy('')
|
pyperclip.copy('')
|
||||||
pipeable.stdout(f'{path.basename} {text}')
|
pipeable.stdout(f'{path.basename} {text}')
|
||||||
path.write('w', text, encoding='utf-8')
|
path.write('w', text, encoding='utf-8')
|
||||||
|
|
Loading…
Reference in a new issue