From 9f9edcc6ed88e81522e452ae4b83a6c841bdd3b6 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Wed, 9 Sep 2009 20:08:38 +0000 Subject: Packages: Make Packages handle urls not terminated with /'s properly (Resolves Ticket #716) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5423 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Plugins/Packages.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib/Server/Plugins') diff --git a/src/lib/Server/Plugins/Packages.py b/src/lib/Server/Plugins/Packages.py index 14958bbda..f3d958510 100644 --- a/src/lib/Server/Plugins/Packages.py +++ b/src/lib/Server/Plugins/Packages.py @@ -24,8 +24,12 @@ def source_from_xml(xsource): ret['component'] = ['placeholder'] if xsource.find('RawURL') is not None: ret['rawurl'] = xsource.find('RawURL').text + if not ret['rawurl'].endswith('/'): + ret['rawurl'] += '/' else: ret['url'] = xsource.find('URL').text + if not ret['url'].endswith('/'): + ret['url'] += '/' return ret class Source(object): -- cgit v1.2.3-1-g7c22