Open edbennett opened 2 months ago
Even when the -m option is not passed, that file md5sums.txt is still created.
-m
md5sums.txt
This is because the definition of the -m option uses action="store_true", default=False, while the check in the code uses options.md5 is not None.
action="store_true", default=False
options.md5 is not None
Since options.md5 will only ever be True or False, it is always not None, so this check always passes.
options.md5
True
False
not None
Even when the
-m
option is not passed, that filemd5sums.txt
is still created.This is because the definition of the
-m
option usesaction="store_true", default=False
, while the check in the code usesoptions.md5 is not None
.Since
options.md5
will only ever beTrue
orFalse
, it is alwaysnot None
, so this check always passes.