def mod_watch(name, **kwargs):
 sfun = kwargs.pop('sfun', None)
 mapfun = {'purged': purged, 'latest': latest, 'removed': removed, 'installed': installed}
 if (sfun in mapfun):
  return mapfun[sfun](name, **kwargs)
 return {'name': name, 'changes': {}, 'comment': 'pkg.{0} does not work with the watch requisite'.format(sfun), 'result': False}

def mod_watch ( name , ** kwargs ) : sfun = kwargs . pop ( 'sfun' , None ) mapfun = { 'purged' : purged , 'latest' : latest , 'removed' : removed , 'installed' : installed } if ( sfun in mapfun ) : return mapfun [ sfun ] ( name , ** kwargs ) return { 'name' : name , 'changes' : { } , 'comment' : 'pkg.{0} does not work with the watch requisite' . format ( sfun ) , 'result' : False }
the tomcat watcher function .