mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
@@ -26,6 +26,8 @@ import inspect
|
|||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import sys
|
import sys
|
||||||
|
import warnings
|
||||||
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
from ansible import constants as C
|
from ansible import constants as C
|
||||||
@@ -340,7 +342,9 @@ class PluginLoader:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if path not in self._module_cache:
|
if path not in self._module_cache:
|
||||||
self._module_cache[path] = self._load_module_source(name, path)
|
with warnings.catch_warnings():
|
||||||
|
warnings.simplefilter("ignore", RuntimeWarning)
|
||||||
|
self._module_cache[path] = self._load_module_source(name, path)
|
||||||
|
|
||||||
if kwargs.get('class_only', False):
|
if kwargs.get('class_only', False):
|
||||||
obj = getattr(self._module_cache[path], self.class_name)
|
obj = getattr(self._module_cache[path], self.class_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user