#NEWLINE# def _http_post( self , post_data ) : #NEWLINE# #INDENT# 'Performs a HTTP POST call to the Flickr REST URL.\n\n        Raises a httplib.ImproperConnectionState exception when the connection\n        was closed unexpectedly.\n        ' #NEWLINE# try : #NEWLINE# #INDENT# if ( 'conn' not in self . thr . __dict__ ) : #NEWLINE# #INDENT# self . thr . conn = http_client . HTTPConnection ( self . flickr_host ) #NEWLINE# LOG . info ( ( 'connection opened to %s' % e . flickr_host ) , 3 ) #NEWLINE# #UNINDENT# self . thr . conn . request ( 'POST' , self . flickr_rest_form , post_data , { #NEWLINE# #INDENT# 'Content-Type' : 'application/x-www-form-urlencoded' , #NEWLINE# #UNINDENT# } ) #NEWLINE# reply = self . thr . conn . getresponse ( ) . read ( ) #NEWLINE# #UNINDENT# except http_client . ImproperConnectionState as e : #NEWLINE# #INDENT# LOG . error ( ( 'connection error: %s' % e ) , 3 ) #NEWLINE# self . thr . conn . close ( ) #NEWLINE# del self . thr . conn #NEWLINE# raise #NEWLINE# #UNINDENT# return reply