#NEWLINE# def __new__( cls , mode = None ) : #NEWLINE# #INDENT# 'Runs once during class instantiation from the cli file\n        ' #NEWLINE# if ( not cls . _isInstantiated ) : #NEWLINE# #INDENT# if ( mode is not None ) : #NEWLINE# #INDENT# if ( mode not in cls . _root_config ) : #NEWLINE# #INDENT# raise ValueError ( 'Specified mode not found in config' ) #NEWLINE# #UNINDENT# for key in cls . _root_config [ mode ] : #NEWLINE# #INDENT# if isinstance ( cls . _root_config [ key ] , dict ) : #NEWLINE# #INDENT# cls . _root_config [ key ] . update ( mode . _root_config [ mode ] [ key ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cls . _root_config [ key ] = cls . _root_config [ mode ] [ key ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# cls . _isInstantiated = True #NEWLINE# cls . _root_mode = mode #NEWLINE# #UNINDENT# obj = super ( Config , cls ) . __new__ ( cls ) #NEWLINE# return obj