#NEWLINE# def from_envvar( self , variable_name , silent = False ) : #NEWLINE# #INDENT# "Loads a configuration from an environment variable pointing to\n        a configuration file.  This is basically just a shortcut with nicer\n        error messages for this line of code::\n\n            app.config.from_pyfile(os.environ['YOURAPPLICATION_SETTINGS'])\n\n        :param variable_name: name of the environment variable\n        :param silent: set to ``True`` if you want silent failure for missing\n                       files.\n        :return: bool. ``True`` if able to load config, ``False`` otherwise.\n        " #NEWLINE# rv = os . environ . get ( variable_name ) #NEWLINE# if ( not rv ) : #NEWLINE# #INDENT# if silent : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# raise RuntimeError ( ( 'The environment variable %r is not set and as such configuration could not be loaded.  Set this variable and make it point to a configuration file' % variable_name ) ) #NEWLINE# #UNINDENT# return self . from_pyfile ( variable_name , silent = silent )