def check_main_evennia_dependencies():
    """
    Checks and imports the Evennia dependencies. This must be done
    already before the paths are set up.

    Returns:
        not_error (bool): True if no dependency error was found.

    """
    error = False

    # Python
    pversion = ".".join(str(num) for num in sys.version_info if type(num) == int)
    if pversion < PYTHON_MIN:
        print(ERROR_PYTHON_VERSION.format(pversion=pversion, python_min=PYTHON_MIN))
        error = True
    # Twisted
    try:
        import twisted
        tversion = twisted.version.short()
        if tversion < TWISTED_MIN:
            print(ERROR_TWISTED_VERSION.format(
                tversion=tversion, twisted_min=TWISTED_MIN))
            error = True
    except ImportError:
        print(ERROR_NOTWISTED)
        error = True
    # Django
    try:
        dversion = ".".join(str(num) for num in django.VERSION if type(num) == int)
        # only the main version (1.5, not 1.5.4.0)
        dversion_main = ".".join(dversion.split(".")[:2])
        if dversion < DJANGO_MIN:
            print(ERROR_DJANGO_MIN.format(
                dversion=dversion_main, django_min=DJANGO_MIN))
            error = True
        elif DJANGO_MIN <= DJANGO_REC < dversion:
            print(NOTE_DJANGO_MIN.format(
                dversion=dversion_main, django_rec=DJANGO_REC))
        elif DJANGO_REC < dversion_main:
            print(NOTE_DJANGO_NEW.format(
                dversion=dversion_main, django_rec=DJANGO_REC))
    except ImportError:
        print(ERROR_NODJANGO)
        error = True
    if error:
        sys.exit()
    # return True/False if error was reported or not
    return not error
dataset/ETHPy150Open evennia/evennia/evennia/server/evennia_launcher.py/check_main_evennia_dependencies/swapped operands of `<`