Make sure req is defined in reset_password

Thomas Oulevey requested to merge toulevey/cern-get-keytab:master into master


Small fix for a corner case in reset_password when missing CERN CAs :

Please review !

low priority.

local port 699 was not usable: HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /api/ResetComputerPassword/host (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)')))
Traceback (most recent call last):
  File "/home/debian/src/rpms/cern-get-keytab/src/", line 865, in <module>
  File "/home/debian/src/rpms/cern-get-keytab/src/", line 770, in main
    principal, password = reset_password(
  File "/home/debian/src/rpms/cern-get-keytab/src/", line 391, in reset_password
    if not req:
UnboundLocalError: cannot access local variable 'req' where it is not associated with a value
Edited by Thomas Oulevey

Merge request reports