Skip to content

Commit

Permalink
🚑 Suppress import errors in inventory plugins
Browse files Browse the repository at this point in the history
These are coming from `awx` having convoluted and undeclared
dependency tree.
  • Loading branch information
webknjaz committed Aug 29, 2024
1 parent 555b9d4 commit 506c0dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/awx_plugins/credentials/injectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
import stat
import tempfile

from awx.main.utils.execution_environments import to_container_path
from django.conf import settings
from contextlib import suppress as _suppress_exception

with _suppress_exception(ImportError):
# FIXME: stop suppressing once the circular dependency is untangled
from awx.main.utils.execution_environments import to_container_path
from django.conf import settings

import yaml

Expand Down
7 changes: 5 additions & 2 deletions src/awx_plugins/inventory/plugins.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import os.path
import stat
import tempfile
from contextlib import suppress as _suppress_exception

from awx.main.utils.execution_environments import to_container_path
from awx.main.utils.licensing import server_product_name
with _suppress_exception(ImportError):
# FIXME: stop suppressing once the circular dependency is untangled
from awx.main.utils.execution_environments import to_container_path
from awx.main.utils.licensing import server_product_name

import yaml

Expand Down

0 comments on commit 506c0dd

Please sign in to comment.