Replaced use of system-provided 'ls' with 'os.listdir'

This commit is contained in:
2022-12-04 18:57:23 -05:00
parent 45e2b60e10
commit 31a4c7b8e7
+2 -1
View File
@@ -554,7 +554,8 @@ def whitelist_verify(_port, _username_ssh, _ip, _client_device_id):
except CalledProcessError:
_i, _full_password = 0, ''
_server_whitelist = run(['ssh', '-i', expanduser('~/.ssh/sshyp'), '-p', _port, f"{_username_ssh}@{_ip}",
'ls ~/.config/sshyp/whitelist'], stdout=PIPE, text=True).stdout.rstrip().split('\n')
f'python -c \'from os import listdir; print(*listdir("/home/{_username_ssh}'
f'/.config/sshyp/whitelist"))\''], stdout=PIPE, text=True).stdout.rstrip().split(' ')
for _device_id in _server_whitelist:
if _device_id == _client_device_id:
_quick_unlock_password = input('\nquick-unlock passphrase: ')