From 752bf9e23ac761cdcab793b54c7d1aa2b5df64cb Mon Sep 17 00:00:00 2001 From: Zbigniew Siciarz Date: Wed, 12 Nov 2014 09:35:02 +0100 Subject: [PATCH] Use package skip list inside the loop to avoid KeyError --- pipdeptree.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pipdeptree.py b/pipdeptree.py index 42e75b5..1317dde 100644 --- a/pipdeptree.py +++ b/pipdeptree.py @@ -241,6 +241,8 @@ def main(): print('Warning!!! Possible confusing dependencies found:', file=sys.stderr) for xs in confusing: for i, (p, d) in enumerate(xs): + if d.key in skip: + continue pkg = top_pkg_name(p) req = non_top_pkg_name(d, pkg_index[d.key]) tmpl = ' {0} -> {1}' if i > 0 else '* {0} -> {1}'