#NEWLINE# def __init__( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# settings_module = os . environ [ ENVIRONMENT_VARIABLE ] #NEWLINE# if ( not settings_module ) : #NEWLINE# #INDENT# raise KeyError #NEWLINE# #UNINDENT# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise ImportError ( ( 'Flexisettings cannot be imported, because environment variable %s is undefined.' % ENVIRONMENT_VARIABLE ) ) #NEWLINE# #UNINDENT# self . _settings_module = settings_module #NEWLINE# self . _settings_path = self . _get_mod_dir ( settings_module ) #NEWLINE# self . _import_settings ( ) #NEWLINE# if self . _globals [ 'FLEXI_LAYOUT_DISCOVERY' ] : #NEWLINE# #INDENT# self . _layout_discovery ( ) #NEWLINE# #UNINDENT# if self . _globals [ 'FLEXI_AUTORELOAD' ] : #NEWLINE# #INDENT# for ( module , modfile ) in self . _wrapped_modules . iteritems ( ) : #NEWLINE# #INDENT# sys . modules [ ( 'flexisettings.wrapped.%s' % module ) ] = MockModule ( module , modfile )