
Reviewed-by: Daniel Barboza <dhbarboza82@gmail.com> Tested-by: Daniel Barboza <dhbarboza82@gmail.com> This patch also fixes github #630 (test_repository_update in test_model.py). On 03/26/2015 04:49 PM, Aline Manera wrote:
Reviewed-by: Aline Manera <alinefm@linux.vnet.ibm.com>
On 24/03/2015 15:16, CrÃstian Viana wrote:
When the user tries to update a YUM repository and some of the variables are not passed, the code will try to use those variables anyway and an exception will be raised.
Check if some YUM repository variables are empty before using them.
Signed-off-by: CrÃstian Viana <vianac@linux.vnet.ibm.com> --- src/kimchi/repositories.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/repositories.py b/src/kimchi/repositories.py index f1e1eb3..19c5810 100644 --- a/src/kimchi/repositories.py +++ b/src/kimchi/repositories.py @@ -275,10 +275,10 @@ class YumRepo(object): config = params.get('config', {}) mirrorlist = config.get('mirrorlist', None) - if len(baseurl.strip()) == 0: + if baseurl is not None and len(baseurl.strip()) == 0: baseurl = None - if len(mirrorlist.strip()) == 0: + if mirrorlist is not None and len(mirrorlist.strip()) == 0: mirrorlist = None if baseurl is None and mirrorlist is None:
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel