From 102167f22ecc8dd2dd4c0fed919f02579de18f17 Mon Sep 17 00:00:00 2001 From: Jim Patterson Date: Sun, 30 Nov 2014 19:31:09 -0500 Subject: [PATCH] Correct check mode for pip in virtualenv. Fix #412. Check mode was always returning changed=True for pip when the target was in a virtualenv. The code now uses the normal tests for determining if change status. --- packaging/language/pip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/language/pip.py b/packaging/language/pip.py index 17f52c00398..3ba93185a31 100644 --- a/packaging/language/pip.py +++ b/packaging/language/pip.py @@ -314,7 +314,7 @@ def main(): this_dir = os.path.join(this_dir, chdir) if module.check_mode: - if env or extra_args or requirements or state == 'latest' or not name: + if extra_args or requirements or state == 'latest' or not name: module.exit_json(changed=True) elif name.startswith('svn+') or name.startswith('git+') or \ name.startswith('hg+') or name.startswith('bzr+'):