- cis = self.choose()
- logger.log_msg('Forwarding to %s' % cis, logger.LOG_LEVEL_DEBUG)
- urllib.urlopen(cis + request, data)
+ while len(urls) != 0:
+ cis = self.choose(urls)
+
+ # Request is forwarded to the chosen CIS.
+ try:
+ urllib.urlopen(cis + request, data)
+ except IOError:
+ logger.log_msg('Failed to forward request to %s' % cis, \
+ logger.LOG_LEVEL_ERROR)
+ continue
+
+ logger.log_msg('Request forwarded to %s' % cis, \
+ logger.LOG_LEVEL_INFO)
+ break