comparison roundup/cgi/actions.py @ 5164:114d9628fd77

Fixed a couple of failing tests for *LoginRedirect in test_actions.py after url validation. Also raise ValueError from examine_url if base url is None.
author John Rouillard <rouilj@ieee.org>
date Sat, 23 Jul 2016 17:21:14 -0400
parents 3ee79a2d95d4
children a86860224d80
comparison
equal deleted inserted replaced
5163:6ae426092d7d 5164:114d9628fd77
80 80
81 Finally paste the whole thing together and return the new url. 81 Finally paste the whole thing together and return the new url.
82 ''' 82 '''
83 83
84 parsed_url_tuple = urllib_.urlparse(url) 84 parsed_url_tuple = urllib_.urlparse(url)
85 parsed_base_url_tuple = urllib_.urlparse(self.base) 85 if self.base:
86 parsed_base_url_tuple = urllib_.urlparse(self.base)
87 else:
88 raise ValueError(self._("Base url not set. Check configuration."))
86 89
87 info={ 'url': url, 90 info={ 'url': url,
88 'base_url': self.base, 91 'base_url': self.base,
89 'base_scheme': parsed_base_url_tuple.scheme, 92 'base_scheme': parsed_base_url_tuple.scheme,
90 'base_netloc': parsed_base_url_tuple.netloc, 93 'base_netloc': parsed_base_url_tuple.netloc,

Roundup Issue Tracker: http://roundup-tracker.org/