summaryrefslogtreecommitdiff
path: root/openstackclient/api
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2016-08-30 09:20:59 -0500
committerDean Troyer <dtroyer@gmail.com>2016-08-30 09:21:02 -0500
commit110a62f277903b5bf233bfd746e8ce0989ca6df4 (patch)
treeb9921a8622576da8e3fdb98f7fd1f44c826ebc5b /openstackclient/api
parent84c83fc3aeebf8201a301f1864c3b8a1572111f1 (diff)
downloadpython-openstackclient-110a62f277903b5bf233bfd746e8ce0989ca6df4.tar.gz
Add importing file to import warnings
Add the Python file doing the import to the warnings emitted by the modules moved to osc-lib. Users will at least have a hint as to which package is out-of-date. Change-Id: I633b440c30b2b15cfde7a9013e30dfa39ab200bc
Diffstat (limited to 'openstackclient/api')
-rw-r--r--openstackclient/api/auth.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/openstackclient/api/auth.py b/openstackclient/api/auth.py
index d62a82dc..7c520f49 100644
--- a/openstackclient/api/auth.py
+++ b/openstackclient/api/auth.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.api.auth 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.api.auth\n" % __name__
+ "Please use osc_lib.api.auth. This warning is caused by an "
+ "out-of-date import in %s\n" % (__name__, parent_import)
)