def _fetch_templates(src):
 templates = []
 log.debug('Listing contents of {0}'.format(src))
 for item in os.listdir(src):
  s = os.path.join(src, item)
  if os.path.isdir(s):
   template_path = os.path.join(s, TEMPLATE_FILE_NAME)
   if os.path.isfile(template_path):
    templates.append(_get_template(template_path, item))
   else:
    log.debug('Directory does not contain {1} {0}'.format(template_path, TEMPLATE_FILE_NAME))
 return templates

def _fetch_templates ( src ) : templates = [ ] log . debug ( 'Listing contents of {0}' . format ( src ) ) for item in os . listdir ( src ) : s = os . path . join ( src , item ) if os . path . isdir ( s ) : template_path = os . path . join ( s , TEMPLATE_FILE_NAME ) if os . path . isfile ( template_path ) : templates . append ( _get_template ( template_path , item ) ) else : log . debug ( 'Directory does not contain {1} {0}' . format ( template_path , TEMPLATE_FILE_NAME ) ) return templates
fetch all of the templates in the src directory .