| Server IP : 85.214.239.14 / Your IP : 216.73.216.116 Web Server : Apache/2.4.65 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/task/2/root/proc/2/root/proc/3/task/3/cwd/proc/3/task/3/cwd/proc/2/root/bin/ |
Upload File : |
#! /usr/bin/python3
# PYTHON_ARGCOMPLETE_OK
"""Command line entry point for ansible-test."""
# NOTE: This file resides in the _util/target directory to ensure compatibility with all supported Python versions.
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import sys
def main(args=None):
"""Main program entry point."""
ansible_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
source_root = os.path.join(ansible_root, 'test', 'lib')
if os.path.exists(os.path.join(source_root, 'ansible_test', '_internal', '__init__.py')):
# running from source, use that version of ansible-test instead of any version that may already be installed
sys.path.insert(0, source_root)
# noinspection PyProtectedMember
from ansible_test._util.target.common.constants import CONTROLLER_PYTHON_VERSIONS
if version_to_str(sys.version_info[:2]) not in CONTROLLER_PYTHON_VERSIONS:
raise SystemExit('This version of ansible-test cannot be executed with Python version %s. Supported Python versions are: %s' % (
version_to_str(sys.version_info[:3]), ', '.join(CONTROLLER_PYTHON_VERSIONS)))
if any(not os.get_blocking(handle.fileno()) for handle in (sys.stdin, sys.stdout, sys.stderr)):
raise SystemExit('Standard input, output and error file handles must be blocking to run ansible-test.')
# noinspection PyProtectedMember
from ansible_test._internal import main as cli_main
cli_main(args)
def version_to_str(version):
"""Return a version string from a version tuple."""
return '.'.join(str(n) for n in version)
if __name__ == '__main__':
main()