mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-07-08 19:49:09 +00:00
ensure all code is below all imports
This commit is contained in:
parent
5f1600e285
commit
53fb20f659
1 changed files with 11 additions and 12 deletions
|
|
@ -225,6 +225,17 @@ import os
|
|||
import re
|
||||
import traceback
|
||||
|
||||
PYCDLIB_IMP_ERR = None
|
||||
try:
|
||||
import pycdlib
|
||||
|
||||
HAS_PYCDLIB = True
|
||||
except ImportError:
|
||||
PYCDLIB_IMP_ERR = traceback.format_exc()
|
||||
HAS_PYCDLIB = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
|
||||
PLATFORM_ID_MAP = {
|
||||
"x86": b"\x00",
|
||||
"efi": b"\xef",
|
||||
|
|
@ -249,18 +260,6 @@ def _sanitize_iso_path(path, is_file=False):
|
|||
return "/".join(result)
|
||||
|
||||
|
||||
PYCDLIB_IMP_ERR = None
|
||||
try:
|
||||
import pycdlib
|
||||
|
||||
HAS_PYCDLIB = True
|
||||
except ImportError:
|
||||
PYCDLIB_IMP_ERR = traceback.format_exc()
|
||||
HAS_PYCDLIB = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
|
||||
|
||||
def add_file(module, iso_file=None, src_file=None, file_path=None, rock_ridge=None, use_joliet=None, use_udf=None):
|
||||
rr_name = None
|
||||
joliet_path = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue