aws-blog-multi-az-multi-region-redshift/loader.py [136:156]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	tries = 0
	while tries < 10:
		tries += 1
		time.sleep(1)
		try:
			makeauth()
			k_conn = boto.kinesis.connect_to_region(region)
			response = k_conn.describe_stream(stream_name)	
			if response['StreamDescription']['StreamStatus'] == "ACTIVE":
				break 
		except :
			print "error while trying to describe kinesis stream " + stream_name
			raise
		else:
			raise TimeoutError('Stream is still not active, aborting...')
	shard_ids = []
	stream_name = None 
	if response and 'StreamDescription' in response:
		stream_name = response['StreamDescription']['StreamName']					
		for shard_id in response['StreamDescription']['Shards']:
			shard_id = shard_id['ShardId']
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



aws-blog-multi-az-multi-region-redshift/loader.py [197:217]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	tries = 0
	while tries < 10:
		tries += 1
		time.sleep(1)
		try:
			makeauth()
			k_conn = boto.kinesis.connect_to_region(region)
			response = k_conn.describe_stream(stream_name)	
			if response['StreamDescription']['StreamStatus'] == "ACTIVE":
				break 
		except :
			print "error while trying to describe kinesis stream " + stream_name
			raise
		else:
			raise TimeoutError('Stream is still not active, aborting...')
	shard_ids = []
	stream_name = None 
	if response and 'StreamDescription' in response:
		stream_name = response['StreamDescription']['StreamName']					
		for shard_id in response['StreamDescription']['Shards']:
			shard_id = shard_id['ShardId']
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



