hp-check: Add constants for the dependency indices

Bug #1688686 reported by Francois Gouget
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

check.py and core_installer.py use literal constants such as 3, 5 or 7 to access the fields of the dependencies array. This results in very error-prone, obfuscated and unmaintainable code.

So I introduced constants: DEPENDENCY_VER_MIN_INDEX is a lot clearer than '3'.
(I'll grant you that it's a bit verbose but to my defense I only followed the existing naming convention.)

See the attached patch. This patch can also be found on:
https://github.com/fgouget/hplip

Revision history for this message
Francois Gouget (fgouget) wrote :
Revision history for this message
Francois Gouget (fgouget) wrote :

More precisely it is on the fixes branch:
https://github.com/fgouget/hplip/commits/fixes

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.