def _check_versionlock():
 if (_yum() == 'dnf'):
  vl_plugin = 'python-dnf-plugins-extras-versionlock'
 else:
  vl_plugin = ('yum-versionlock' if (__grains__.get('osmajorrelease') == '5') else 'yum-plugin-versionlock')
 if (vl_plugin not in list_pkgs()):
  raise SaltInvocationError('Cannot proceed, {0} is not installed.'.format(vl_plugin))

def _check_versionlock ( ) : if ( _yum ( ) == 'dnf' ) : vl_plugin = 'python-dnf-plugins-extras-versionlock' else : vl_plugin = ( 'yum-versionlock' if ( __grains__ . get ( 'osmajorrelease' ) == '5' ) else 'yum-plugin-versionlock' ) if ( vl_plugin not in list_pkgs ( ) ) : raise SaltInvocationError ( 'Cannot proceed, {0} is not installed.' . format ( vl_plugin ) )
ensure that the appropriate versionlock plugin is present .