def fetch_url(url):
 try:
  result = urllib2.urlopen(url)
 except urllib2.HTTPError as e:
  if (e.code == 401):
   logging.error(((('HTTPError: ' + str(e.reason)) + ' ') + str(e.code)))
   auth_admin_url()
  else:
   logging.error(((('HTTPError: ' + str(e.reason)) + ' ') + str(e.code)))
 else:
  return result

def fetch_url ( url ) : try : result = urllib2 . urlopen ( url ) except urllib2 . HTTPError as e : if ( e . code == 401 ) : logging . error ( ( ( ( 'HTTPError: ' + str ( e . reason ) ) + ' ' ) + str ( e . code ) ) ) auth_admin_url ( ) else : logging . error ( ( ( ( 'HTTPError: ' + str ( e . reason ) ) + ' ' ) + str ( e . code ) ) ) else : return result
returns fetched url .