danb35 / deploy-freenas

Python script to automate deploying TLS certificates to FreeNAS servers
GNU General Public License v3.0
202 stars 56 forks source link

strptime() argument 1 must be str, not None #34

Closed oasisck closed 3 years ago

oasisck commented 3 years ago

Hi, I updated Freenas to Truenas and your script to the latest version. I had an error :

Certificate import successful
Certificate list successful
Setting active certificate successful
Traceback (most recent call last):
  File "/.../.../deploy_freenas.py", line 171, in <module>
    issued_date = datetime.strptime(cert_data['from'], "%c")
TypeError: strptime() argument 1 must be str, not None

thanks

danb35 commented 3 years ago

With the latest updates, I'm not seeing this error. Can you confirm it's fixed with the current version of the script?

oasisck commented 3 years ago

I switched to another distrib since, so dunno :) I close the issue.

TotalNormal2 commented 3 years ago

I got the same issue. It was caused by a pending "certificate signing request", which will be listed, but contains no "from".