Automating the Publishing through arcpy scripting and modifying the properties of the SDDraft by xml parsing. Able to change most of the properties but when running the script for recycleInterval property I'm getting this error :
if key.firstChild.data == 'recycleInterval': key.nextSibling.firstChild.data = 1
AttributeError: 'NoneType' object has no attribute 'data'
Script :
for key in keys:
if key.firstChild.data == 'UsageTimeout': key.nextSibling.firstChild.data = 43200
if key.firstChild.data == 'WaitTimeout': key.nextSibling.firstChild.data = 300
if key.firstChild.data == 'IdleTimeout': key.nextSibling.firstChild.data = 1800
if key.firstChild.data == 'MinInstances': key.nextSibling.firstChild.data = 1
if key.firstChild.data == 'MaxInstances': key.nextSibling.firstChild.data = 2
if key.firstChild.data == 'recycleInterval': key.nextSibling.firstChild.data = 1
How can I get this issue resolved. Thank you.