def freeze(bin_env=None, user=None, cwd=None, use_vt=False):
 pip_bin = _get_pip_bin(bin_env)
 cmd = [pip_bin, 'freeze']
 min_version = '8.0.3'
 cur_version = version(bin_env)
 if (not salt.utils.compare_versions(ver1=cur_version, oper='>=', ver2=min_version)):
  logger.warning('The version of pip installed is {0}, which is older than {1}. The packages pip, wheel, setuptools, and distribute will not be included in the output of pip.freeze'.format(cur_version, min_version))
 else:
  cmd.append('--all')
 cmd_kwargs = dict(runas=user, cwd=cwd, use_vt=use_vt, python_shell=False)
 if (bin_env and os.path.isdir(bin_env)):
  cmd_kwargs['env'] = {'VIRTUAL_ENV': bin_env}
 result = __salt__['cmd.run_all'](cmd, **cmd_kwargs)
 if (result['retcode'] > 0):
  raise CommandExecutionError(result['stderr'])
 return result['stdout'].splitlines()

def freeze ( bin_env = None , user = None , cwd = None , use_vt = False ) : pip_bin = _get_pip_bin ( bin_env ) cmd = [ pip_bin , 'freeze' ] min_version = '8.0.3' cur_version = version ( bin_env ) if ( not salt . utils . compare_versions ( ver1 = cur_version , oper = '>=' , ver2 = min_version ) ) : logger . warning ( 'The version of pip installed is {0}, which is older than {1}. The packages pip, wheel, setuptools, and distribute will not be included in the output of pip.freeze' . format ( cur_version , min_version ) ) else : cmd . append ( '--all' ) cmd_kwargs = dict ( runas = user , cwd = cwd , use_vt = use_vt , python_shell = False ) if ( bin_env and os . path . isdir ( bin_env ) ) : cmd_kwargs [ 'env' ] = { 'VIRTUAL_ENV' : bin_env } result = __salt__ [ 'cmd.run_all' ] ( cmd , ** cmd_kwargs ) if ( result [ 'retcode' ] > 0 ) : raise CommandExecutionError ( result [ 'stderr' ] ) return result [ 'stdout' ] . splitlines ( )
modify graph to prevent further change by adding or removing nodes or edges .