diff --git a/.mention-bot b/.mention-bot index 1c9a214fd5..56be9ab9e6 100644 --- a/.mention-bot +++ b/.mention-bot @@ -1,5 +1,5 @@ { "skipTitle": "Merge forward", - "userBlacklist": [] + "userBlacklist": ["cvrebert", "markusgattol", "olliewalsh"] } diff --git a/salt/states/virtualenv_mod.py b/salt/states/virtualenv_mod.py index 9a5678ceaf..156cd53b41 100644 --- a/salt/states/virtualenv_mod.py +++ b/salt/states/virtualenv_mod.py @@ -14,7 +14,7 @@ import os import salt.version import salt.utils -from salt.exceptions import CommandNotFoundError +from salt.exceptions import CommandExecutionError, CommandNotFoundError from salt.ext import six log = logging.getLogger(__name__) @@ -237,7 +237,12 @@ def managed(name, # Populate the venv via a requirements file if requirements or pip_pkgs: - before = set(__salt__['pip.freeze'](bin_env=name, user=user, use_vt=use_vt)) + try: + before = set(__salt__['pip.freeze'](bin_env=name, user=user, use_vt=use_vt)) + except CommandExecutionError as exc: + ret['result'] = False + ret['comment'] = exc.strerror + return ret if requirements: