summaryrefslogtreecommitdiff
path: root/openstackclient/common/utils.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-09-11 02:24:37 +0000
committerGerrit Code Review <review@openstack.org>2016-09-11 02:24:37 +0000
commit7d3d2b0c374c1b9b935d166ddf4e7ae13da95135 (patch)
treeee00e9de033350ddc598df1509d3f6ee9174d33b /openstackclient/common/utils.py
parent676a0e9696ba7550132e4501bdbf3160608faed6 (diff)
parent110a62f277903b5bf233bfd746e8ce0989ca6df4 (diff)
downloadpython-openstackclient-7d3d2b0c374c1b9b935d166ddf4e7ae13da95135.tar.gz
Merge "Add importing file to import warnings"
Diffstat (limited to 'openstackclient/common/utils.py')
-rw-r--r--openstackclient/common/utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/openstackclient/common/utils.py b/openstackclient/common/utils.py
index 73cd3dc9..aeb3aea7 100644
--- a/openstackclient/common/utils.py
+++ b/openstackclient/common/utils.py
@@ -14,12 +14,15 @@
# NOTE(dtroyer): This file is deprecated in Jun 2016, remove after 4.x release
# or Jun 2017.
+import inspect
import sys
from osc_lib.utils import * # noqa
+parent_import = inspect.getouterframes(inspect.currentframe())[1][1]
sys.stderr.write(
"WARNING: %s is deprecated and will be removed after Jun 2017. "
- "Please use osc_lib.utils\n" % __name__
+ "Please use osc_lib.utils. This warning is caused by an "
+ "out-of-date import in %s\n" % (__name__, parent_import)
)