def pollscm(registry, xml_parent, data):
 try:
  cron = data['cron']
  ipch = str(data.get('ignore-post-commit-hooks', False)).lower()
 except KeyError as e:
  raise MissingAttributeError(e)
 except TypeError:
  logger.warning('Your pollscm usage is deprecated, please use the syntax described in the documentation instead')
  cron = data
  ipch = 'false'
 if ((not cron) and (cron != '')):
  raise InvalidAttributeError('cron', cron)
 scmtrig = XML.SubElement(xml_parent, 'hudson.triggers.SCMTrigger')
 XML.SubElement(scmtrig, 'spec').text = cron
 XML.SubElement(scmtrig, 'ignorePostCommitHooks').text = ipch

def pollscm ( registry , xml_parent , data ) : try : cron = data [ 'cron' ] ipch = str ( data . get ( 'ignore-post-commit-hooks' , False ) ) . lower ( ) except KeyError as e : raise MissingAttributeError ( e ) except TypeError : logger . warning ( 'Your pollscm usage is deprecated, please use the syntax described in the documentation instead' ) cron = data ipch = 'false' if ( ( not cron ) and ( cron != '' ) ) : raise InvalidAttributeError ( 'cron' , cron ) scmtrig = XML . SubElement ( xml_parent , 'hudson.triggers.SCMTrigger' ) XML . SubElement ( scmtrig , 'spec' ) . text = cron XML . SubElement ( scmtrig , 'ignorePostCommitHooks' ) . text = ipch
yaml: pollscm poll the scm to determine if there has been a change .