#NEWLINE# @ property #NEWLINE# def connection( cls ) : #NEWLINE# #INDENT# 'HTTP connection for the current thread' #NEWLINE# local = cls . _threadlocal #NEWLINE# if ( not getattr ( local , 'connection' , None ) ) : #NEWLINE# #INDENT# local . user = cls . user #NEWLINE# local . password = cls . password #NEWLINE# local . site = cls . site #NEWLINE# local . timeout = cls . timeout #NEWLINE# local . headers = cls . headers #NEWLINE# local . format = cls . format #NEWLINE# if ( cls . site is None ) : #NEWLINE# #INDENT# raise ValueError ( 'No shopify session is active' ) #NEWLINE# #UNINDENT# local . connection = ShopifyConnection ( cls . site , cls . user , cls . password , cls . timeout , cls . format ) #NEWLINE# #UNINDENT# return cls . connection