def check_module_metadata_editability(module):
 allowed = allowed_metadata_by_category(module.location.category)
 if ('*' in allowed):
  return 0
 allowed = (allowed + ['xml_attributes', 'display_name'])
 err_cnt = 0
 illegal_keys = (set(own_metadata(module).keys()) - set(allowed))
 if (len(illegal_keys) > 0):
  err_cnt = (err_cnt + 1)
  print ': found non-editable metadata on {url}. These metadata keys are not supported = {keys}'.format(url=unicode(module.location), keys=illegal_keys)
 return err_cnt

def check_module_metadata_editability ( module ) : allowed = allowed_metadata_by_category ( module . location . category ) if ( '*' in allowed ) : return 0 allowed = ( allowed + [ 'xml_attributes' , 'display_name' ] ) err_cnt = 0 illegal_keys = ( set ( own_metadata ( module ) . keys ( ) ) - set ( allowed ) ) if ( len ( illegal_keys ) > 0 ) : err_cnt = ( err_cnt + 1 ) print ': found non-editable metadata on {url}. These metadata keys are not supported = {keys}' . format ( url = unicode ( module . location ) , keys = illegal_keys ) return err_cnt
assert that there is no metadata within a particular module that we cant support editing .