mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
avoid exceptiosn when not being called by CLI
This commit is contained in:
parent
e80cd8bcaf
commit
bc60f52db5
1 changed files with 4 additions and 1 deletions
|
@ -23,7 +23,10 @@ import json
|
|||
import os
|
||||
import uuid
|
||||
|
||||
from __main__ import cli
|
||||
try:
|
||||
from __main__ import cli
|
||||
except ImportError:
|
||||
cli = None
|
||||
|
||||
from ansible.constants import mk_boolean
|
||||
from ansible.module_utils.urls import open_url
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue