def validate_manifest(filepath):
 manifest_data = return_json(filepath)
 dependencies = manifest_data['dependencies']
 for (_, dependency) in dependencies.items():
  for (_, dependency_contents) in dependency.items():
   if ('downloadFormat' not in dependency_contents):
    raise Exception(('downloadFormat not specified in %s' % dependency_contents))
   download_format = dependency_contents['downloadFormat']
   test_manifest_syntax(download_format, dependency_contents)

def validate_manifest ( filepath ) : manifest_data = return_json ( filepath ) dependencies = manifest_data [ 'dependencies' ] for ( _ , dependency ) in dependencies . items ( ) : for ( _ , dependency_contents ) in dependency . items ( ) : if ( 'downloadFormat' not in dependency_contents ) : raise Exception ( ( 'downloadFormat not specified in %s' % dependency_contents ) ) download_format = dependency_contents [ 'downloadFormat' ] test_manifest_syntax ( download_format , dependency_contents )
this validates syntax of the manifest .