Avoid using 'ppa' local variable since it overshadows the imported ppa package
Bug #1993741 reported by
Bryce Harrington
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ppa-dev-tools |
Fix Released
|
Low
|
Bryce Harrington |
Bug Description
In the ppa script, we lookup a Ppa class instance and place it into an object named 'ppa', however all the modules that the script uses are in the ppa module namespace. This can at least create confusion, and may potentially cause some code errors or ambiguity.
I'm not sure what a better variable name should be. In command_create(), 'new_ppa' seems obvious, but that's only work there.
Related branches
ppa-dev-tools:fix-lp1993368-cli-arg-behavior
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
- Canonical Server Reporter: Pending requested
-
Diff: 450 lines (+119/-71)2 files modified.flake8 (+1/-1)
scripts/ppa (+118/-70)
Changed in ppa-dev-tools: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
I've implemented a fix to this, by renaming the 'ppa' variables to 'the_ppa'.