Skip to content

Commit

Permalink
esp_prov: prompt for passphrase if not given
Browse files Browse the repository at this point in the history
  • Loading branch information
ccutrer committed Jun 13, 2022
1 parent c73ff7b commit 2bf5be4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/esp_prov/esp_prov.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ async def main():
'If Wi-Fi scanning is supported by the provisioning service, this need not '
'be specified'))

parser.add_argument('--passphrase', dest='passphrase', type=str, default='',
parser.add_argument('--passphrase', dest='passphrase', type=str,
help=desc_format(
'This configures the device to use Passphrase for the Wi-Fi network to which '
'we would like it to connect to permanently, once provisioning is complete. '
Expand Down Expand Up @@ -455,6 +455,8 @@ async def main():
break

args.ssid = APs[select - 1]['ssid']

if args.passphrase is None:
prompt_str = 'Enter passphrase for {0} : '.format(args.ssid)
args.passphrase = getpass(prompt_str)

Expand Down

0 comments on commit 2bf5be4

Please sign in to comment.