#NEWLINE# def __getattr__( self , item ) : #NEWLINE# #INDENT# if ( not item . delegate . _file ) : #NEWLINE# #INDENT# raise pymongo . errors . InvalidOperation ( ( 'You must call MotorGridOut.open() before accessing the %s property' % item ) ) #NEWLINE# #UNINDENT# return getattr ( self . delegate , item )