chrome/installer/mac/signing/parts.py
def _sanity_check_version_keys(paths, parts):
    """Verifies that the various version keys in Info.plists match.

    Args:
        paths: A |model.Paths| object.
        parts: The dictionary returned from get_parts().
    """
    app_plist_path = os.path.join(paths.work, parts['app'].path, 'Contents',
                                  'Info.plist')
    framework_plist_path = os.path.join(paths.work, parts['framework'].path,
                                        'Resources', 'Info.plist')

    with commands.PlistContext(
            app_plist_path) as app_plist, commands.PlistContext(
                framework_plist_path) as framework_plist:
        if not 'KSVersion' in app_plist:
            assert 'com.google.Chrome' not in app_plist['CFBundleIdentifier']
            return
        ks_version = app_plist['KSVersion']
        cf_version = framework_plist['CFBundleShortVersionString']
        if cf_version != ks_version:
            raise ValueError(
                'CFBundleVersion ({}) does not mach KSVersion ({})'.format(
                    cf_version, ks_version))
Verifies that the various version keys in Info.plists match.

    Args:
        paths: A |model.Paths| object.
        parts: The dictionary returned from get_parts().
    
Verifies that the various version keys in Info.plists match.
Verifies that the various version keys in Info . plists match .
def _sanity_check_version_keys(paths, parts):
    app_plist_path = os.path.join(paths.work, parts['app'].path, 'Contents',
                                  'Info.plist')
    framework_plist_path = os.path.join(paths.work, parts['framework'].path,
                                        'Resources', 'Info.plist')
    with commands.PlistContext(
            app_plist_path) as app_plist, commands.PlistContext(
                framework_plist_path) as framework_plist:
        if not 'KSVersion' in app_plist:
            assert 'com.google.Chrome' not in app_plist['CFBundleIdentifier']
            return
        ks_version = app_plist['KSVersion']
        cf_version = framework_plist['CFBundleShortVersionString']
        if cf_version != ks_version:
            raise ValueError(
                'CFBundleVersion ({}) does not mach KSVersion ({})'.format(
                    cf_version, ks_version))
def _sanity_check_version_keys ( paths , parts ) : app_plist_path = os . path . join ( paths . work , parts [ 'app' ] . path , 'Contents' , 'Info.plist' ) framework_plist_path = os . path . join ( paths . work , parts [ 'framework' ] . path , 'Resources' , 'Info.plist' ) with commands . PlistContext ( app_plist_path ) as app_plist , commands . PlistContext ( framework_plist_path ) as framework_plist : if not 'KSVersion' in app_plist : assert 'com.google.Chrome' not in app_plist [ 'CFBundleIdentifier' ] return ks_version = app_plist [ 'KSVersion' ] cf_version = framework_plist [ 'CFBundleShortVersionString' ] if cf_version != ks_version : raise ValueError ( 'CFBundleVersion ({}) does not mach KSVersion ({})' . format ( cf_version , ks_version ) )
Verifies that the various version keys in Info.plists match.
Verifies that the various version keys in Info . plists match .
"""Verifies that the various version keys in Info.plists match.

    Args:
        paths: A |model.Paths| object.
        parts: The dictionary returned from get_parts().
    """
paths
A |model.Paths| object.
A |model . Paths| object .
parts
The dictionary returned from get_parts().
The dictionary returned from get_parts () .