Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2030 from MycroftAI/bugfix/hide-warnings
Browse files Browse the repository at this point in the history
Hide deprecated warning in certain cases
  • Loading branch information
forslund authored Feb 28, 2019
2 parents 448bc3e + f5025f5 commit 5529acd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mycroft/skills/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,12 @@ def config(self):
""" Provide deprecation warning when accessing config.
TODO: Remove in 19.08
"""
self.log.warning('self.config is deprecated. Switch to using '
'self.setting["whatever"] within your skill.')
stack = simple_trace(traceback.format_stack())
if (" _register_decorated" not in stack and
"register_resting_screen" not in stack):
LOG.warning('self.config is deprecated. Switch to using '
'self.setting["whatever"] within your skill.')
LOG.warning(stack)
return self._config

@property
Expand Down

0 comments on commit 5529acd

Please sign in to comment.