mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Move from using inspect to __file__ in order to find the path to the
module snippets
This commit is contained in:
parent
01a6081b49
commit
c31831f028
1 changed files with 1 additions and 5 deletions
|
@ -22,7 +22,6 @@ __metaclass__ = type
|
||||||
|
|
||||||
# from python and deps
|
# from python and deps
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
import inspect
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import shlex
|
import shlex
|
||||||
|
@ -43,11 +42,8 @@ REPLACER_VERSION = "\"<<ANSIBLE_VERSION>>\""
|
||||||
# specify an encoding for the python source file
|
# specify an encoding for the python source file
|
||||||
ENCODING_STRING = '# -*- coding: utf-8 -*-'
|
ENCODING_STRING = '# -*- coding: utf-8 -*-'
|
||||||
|
|
||||||
# TODO: Is there a reason we don't use __file__ here?
|
|
||||||
# Will this fail if ansible is run from an egg/wheel? Do we care?
|
|
||||||
_THIS_FILE = inspect.getfile(inspect.currentframe())
|
|
||||||
# we've moved the module_common relative to the snippets, so fix the path
|
# we've moved the module_common relative to the snippets, so fix the path
|
||||||
_SNIPPET_PATH = os.path.join(os.path.dirname(this_file), '..', 'module_utils')
|
_SNIPPET_PATH = os.path.join(os.path.dirname(__file__), '..', 'module_utils')
|
||||||
|
|
||||||
# ******************************************************************************
|
# ******************************************************************************
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue