Chilkat2-Python
Chilkat2-Python
Transition from Cert.GetValidFromDt to Cert.ValidFromStr
Provides instructions for replacing deprecated GetValidFromDt method calls with ValidFromStr.Chilkat Chilkat2-Python Downloads
import sys
import chilkat2
cert = chilkat2.Cert()
# ------------------------------------------------------------------------
# The GetValidFromDt method is deprecated:
# ckdt1 is a CkDateTime
ckdt1 = cert.GetValidFromDt()
if (cert.LastMethodSuccess == False):
print(cert.LastErrorText)
sys.exit()
# ...
# ...
# ------------------------------------------------------------------------
# Do the equivalent using the ValidFromStr property
ckdt2 = chilkat2.CkDateTime()
ckdt2.SetFromRfc822(cert.ValidFromStr)