utils.py: de-couple sanitize_pin_adm from argparse 'opts'

This allows the function to be re-used in other contexts

Change-Id: I116e85acca3aeb0a0c24f74653c500ac2dc1d844
This commit is contained in:
Harald Welte
2021-01-08 21:22:38 +01:00
parent a670425088
commit 79b5ba4bdf
2 changed files with 8 additions and 10 deletions

View File

@@ -446,7 +446,7 @@ def gen_parameters(opts):
else:
opc = ''.join(['%02x' % random.randrange(0,256) for i in range(16)])
pin_adm = sanitize_pin_adm(opts)
pin_adm = sanitize_pin_adm(opts.pin_adm, opts.pin_adm_hex)
# ePDG Selection Information
if opts.epdgSelection: