HomePhorge

(maint) Yumrepo boolean values are case insensitive.
f34b9755d08fUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(maint) Yumrepo boolean values are case insensitive.

When handling boolean values for yum repos, a given value is downcased
before it is checked:

  1. yum/config.py def parse(self, s): """Parse a string containing a boolean value. 1, yes, and true will evaluate to True; and 0, no, and false will evaluate to False. Case is ignored.

    :param s: the string containing the boolean value :return: the boolean value contained in *s* :raises: :class:ValueError if there is an error in parsing the boolean value """ s = s.lower() if s in ('0', 'no', 'false'): return False elif s in ('1', 'yes', 'true'): return True else: raise ValueError('invalid boolean value')

When validating these parameters we should perform a case insensitive
match to match the yum behavior.

Details

Provenance
Adrien Thebo <git@somethingsinistral.net>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUa64014ca53bd: (PUP-2178) Map INI name to yumrepo descr
Branches
Unknown
Tags
Unknown

Event Timeline

Adrien Thebo <git@somethingsinistral.net> committed rPUf34b9755d08f: (maint) Yumrepo boolean values are case insensitive. (authored by Adrien Thebo <git@somethingsinistral.net>).Apr 10 2014, 7:46 PM