def get_bumper_sources(video):
 try:
  val_profiles = ['desktop_webm', 'desktop_mp4']
  val_video_urls = edxval_api.get_urls_for_profiles(video.bumper['edx_video_id'], val_profiles)
  bumper_sources = filter(None, [val_video_urls[p] for p in val_profiles])
 except edxval_api.ValInternalError:
  log.warning('Could not retrieve information from VAL for Bumper edx Video ID: %s.', video.bumper['edx_video_id'])
  return []
 return bumper_sources

def get_bumper_sources ( video ) : try : val_profiles = [ 'desktop_webm' , 'desktop_mp4' ] val_video_urls = edxval_api . get_urls_for_profiles ( video . bumper [ 'edx_video_id' ] , val_profiles ) bumper_sources = filter ( None , [ val_video_urls [ p ] for p in val_profiles ] ) except edxval_api . ValInternalError : log . warning ( 'Could not retrieve information from VAL for Bumper edx Video ID: %s.' , video . bumper [ 'edx_video_id' ] ) return [ ] return bumper_sources
get bumper sources from edxval .