1 |
commit: bbb4e5d73ee1f3df12a1cd467beca3a476c5f054 |
2 |
Author: Mike Frysinger <vapier <AT> chromium <DOT> org> |
3 |
AuthorDate: Wed Sep 28 07:03:11 2022 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 28 07:42:17 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=bbb4e5d7 |
7 |
|
8 |
lddtree: avoid shadowing function args |
9 |
|
10 |
pylint warns about redefining |lib| here, and it's right -- the code |
11 |
is a little hard to follow because of it. So give it a diff name. |
12 |
|
13 |
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> |
14 |
|
15 |
lddtree.py | 16 ++++++++-------- |
16 |
1 file changed, 8 insertions(+), 8 deletions(-) |
17 |
|
18 |
diff --git a/lddtree.py b/lddtree.py |
19 |
index 85dd91f..d894505 100755 |
20 |
--- a/lddtree.py |
21 |
+++ b/lddtree.py |
22 |
@@ -589,17 +589,17 @@ def _ActionShow(options: argparse.Namespace, elf: dict): |
23 |
print(f"{indent}{lib}", "=>", fullpath) |
24 |
|
25 |
new_libs = [] |
26 |
- for lib in elf['libs'][lib]['needed']: |
27 |
- if lib in chain_libs: |
28 |
+ for nlib in elf["libs"][lib]["needed"]: |
29 |
+ if nlib in chain_libs: |
30 |
if not options.list: |
31 |
- print(f"{indent}{lib} => !!! circular loop !!!") |
32 |
+ print(f"{indent}{nlib} => !!! circular loop !!!") |
33 |
continue |
34 |
- if options.all or not lib in shown_libs: |
35 |
- shown_libs.add(lib) |
36 |
- new_libs.append(lib) |
37 |
+ if options.all or not nlib in shown_libs: |
38 |
+ shown_libs.add(nlib) |
39 |
+ new_libs.append(nlib) |
40 |
|
41 |
- for lib in new_libs: |
42 |
- _show(lib, depth + 1) |
43 |
+ for nlib in new_libs: |
44 |
+ _show(nlib, depth + 1) |
45 |
chain_libs.pop() |
46 |
|
47 |
shown_libs = set(elf['needed']) |