Issue parsing multiple positional arguments

The argument declaration for --checksum means that following -c/--checksum, an actual boolean is passed in. For example, --checksum yes would “enable” the checksum; due to how bool interprets strings, any argument other than the empty string evaluates to True.

Use the store_true/store_false action to define an argument-less flag that is toggled on/off by being mentioned.

        "-c", "--checksum", action='store_true'

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top