pip: Fix uninitialized variable during check_mode (#4379)

During check_mode (`--check`), the variable change could be
used uninitialized, yielding this error:

`UnboundLocalError: local variable 'changed' referenced before assignment`

This changeset simply initializes it to False.
This commit is contained in:
Evan 2016-08-10 17:45:54 -04:00 committed by René Moser
parent 4905ab66d6
commit b5ad8b83be

View file

@ -410,6 +410,7 @@ def main():
out += out_pip
err += err_pip
changed = False
if name:
for pkg in name:
is_present = _is_present(pkg, version, out.split())