Better deprecation message

Change-Id: I468fb2ac98db2bf677cd354f988e67a1c4749aa0
This commit is contained in:
Ryan Moe
2015-03-17 16:48:21 -07:00
parent e5e8389d8d
commit 570b42af4f

View File

@@ -55,11 +55,12 @@ class FuelClientSettings(object):
# this deprecation warning should be removed as well.
if os.path.exists(external_default_settings) and \
external_default_settings != external_user_settings:
six.print_('DEPRECATION WARNING: file {0} is found and will be '
'used as a source for settings. However, it deprecated '
'and will not be used by default in the ongoing '
'version of '
'python-fuelclient.'.format(external_default_settings),
six.print_('DEPRECATION WARNING: {0} exists and will be '
'used as the source for settings. This behavior is '
'deprecated. Please specify the path to your custom '
'settings file in the FUELCLIENT_CUSTOM_SETTINGS '
'environment variable.'.format(
external_default_settings),
file=sys.stderr)
self._add_file_if_exists(project_settings_file, settings_files)