Add absolute_import future imports

Add absolute_import from __future__ so that pylint
does not fail and to achieve python3 behavior in
python2.

Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Stanislav Laznicka 2018-04-05 09:21:16 +02:00
parent 2de1aa27f9
commit b5bdd07bc5
No known key found for this signature in database
GPG Key ID: C98C414936B1A7F3
121 changed files with 210 additions and 30 deletions

View File

@ -19,6 +19,7 @@
"""
Password migration script
"""
from __future__ import absolute_import
import cgi
import errno

View File

@ -23,6 +23,8 @@
"""
WSGI appliction for IPA server.
"""
from __future__ import absolute_import
import logging
import os
import sys

View File

@ -20,6 +20,7 @@
"""
Plugin index generation script
"""
from __future__ import absolute_import
import logging
import os

View File

@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import logging
import os
import tempfile

View File

@ -2,6 +2,8 @@
# Copyright (C) 2016 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
from ipaclient.install import client
from ipaplatform.paths import paths
from ipapython.install import cli

View File

@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import logging
import operator
import socket

View File

@ -16,6 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import logging
import os
import shutil

View File

@ -22,7 +22,7 @@
# This is used so we can add tracking to the Apache and 389-ds
# server certificates created during the IPA server installation.
from __future__ import print_function
from __future__ import print_function, absolute_import
import logging
import os

View File

@ -2,6 +2,8 @@
# Copyright (C) 2016 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
import logging
import os
import time

View File

@ -23,6 +23,8 @@
# parts of the system configuration to the way it was
# before ipa-server-install was first run
from __future__ import absolute_import
import logging
import os
import os.path

View File

@ -1,6 +1,8 @@
#
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
"""Meta import hook for ipaplatform.
Known Linux distros with /etc/os-release

View File

@ -23,6 +23,8 @@ This base module contains default implementations of IPA interface for
interacting with system services.
'''
from __future__ import absolute_import
import os
import json
import time

View File

@ -22,6 +22,8 @@
This module contains default platform-specific implementations of system tasks.
'''
from __future__ import absolute_import
import logging
from pkg_resources import parse_version

View File

@ -3,6 +3,8 @@
#
"""IpaMetaImporter replaces this module with ipaplatform.$NAME.constants.
"""
from __future__ import absolute_import
import ipaplatform._importhook
ipaplatform._importhook.fixup_module('ipaplatform.constants')

View File

@ -7,6 +7,8 @@ This Debian family platform module exports platform dependant constants.
'''
# Fallback to default path definitions
from __future__ import absolute_import
from ipaplatform.base.constants import BaseConstantsNamespace

View File

@ -8,6 +8,8 @@ in Debian-based systems.
"""
# Fallback to default path definitions
from __future__ import absolute_import
from ipaplatform.base.paths import BasePathNamespace
import sysconfig

View File

@ -6,6 +6,8 @@
Contains Debian-specific service class implementations.
"""
from __future__ import absolute_import
from ipaplatform.base import services as base_services
from ipaplatform.redhat import services as redhat_services
from ipapython import ipautil

View File

@ -6,6 +6,8 @@
This module contains default Debian-specific implementations of system tasks.
"""
from __future__ import absolute_import
from ipaplatform.base.tasks import BaseTaskNamespace
from ipaplatform.redhat.tasks import RedHatTaskNamespace

View File

@ -7,6 +7,8 @@ This Fedora base platform module exports platform related constants.
'''
# Fallback to default constant definitions
from __future__ import absolute_import
from ipaplatform.redhat.constants import RedHatConstantsNamespace

View File

@ -23,6 +23,8 @@ in Fedora-based systems.
'''
# Fallback to default path definitions
from __future__ import absolute_import
from ipaplatform.redhat.paths import RedHatPathNamespace

View File

@ -22,6 +22,8 @@
Contains Fedora-specific service class implementations.
"""
from __future__ import absolute_import
from ipaplatform.redhat import services as redhat_services
# Mappings from service names as FreeIPA code references to these services

View File

@ -23,6 +23,8 @@
This module contains default Fedora-specific implementations of system tasks.
'''
from __future__ import absolute_import
from ipaplatform.redhat.tasks import RedHatTaskNamespace

View File

@ -3,6 +3,8 @@
#
"""IpaMetaImporter replaces this module with ipaplatform.$NAME.paths.
"""
from __future__ import absolute_import
import ipaplatform._importhook
ipaplatform._importhook.fixup_module('ipaplatform.paths')

View File

@ -18,6 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import absolute_import
from ipaplatform.paths import paths
from ipapython import ipautil
from ipapython.admintool import ScriptError

View File

@ -8,6 +8,8 @@ related constants for the Red Hat OS family-based systems.
'''
# Fallback to default path definitions
from __future__ import absolute_import
from ipaplatform.base.constants import BaseConstantsNamespace

View File

@ -22,6 +22,8 @@ This Red Hat OS family base platform module exports default filesystem paths as
common in Red Hat OS family-based systems.
'''
from __future__ import absolute_import
import sys
# Fallback to default path definitions

View File

@ -22,6 +22,8 @@
Contains Red Hat OS family-specific service class implementations.
"""
from __future__ import absolute_import
import logging
import os
import time

View File

@ -23,7 +23,7 @@
This module contains default Red Hat OS family-specific implementations of
system tasks.
'''
from __future__ import print_function
from __future__ import print_function, absolute_import
import ctypes
import logging

View File

@ -7,6 +7,8 @@ This RHEL base platform module exports platform related constants.
'''
# Fallback to default constant definitions
from __future__ import absolute_import
from ipaplatform.redhat.constants import RedHatConstantsNamespace

View File

@ -23,6 +23,8 @@ in RHEL-based systems.
'''
# Fallback to default path definitions
from __future__ import absolute_import
from ipaplatform.redhat.paths import RedHatPathNamespace

View File

@ -22,6 +22,8 @@
Contains RHEL-specific service class implementations.
"""
from __future__ import absolute_import
from ipaplatform.redhat import services as redhat_services
# Mappings from service names as FreeIPA code references to these services

View File

@ -21,6 +21,8 @@
This module contains default RHEL-specific implementations of system tasks.
'''
from __future__ import absolute_import
from ipaplatform.redhat.tasks import RedHatTaskNamespace

View File

@ -3,6 +3,8 @@
#
"""IpaMetaImporter replaces this module with ipaplatform.$NAME.services.
"""
from __future__ import absolute_import
import ipaplatform._importhook
ipaplatform._importhook.fixup_module('ipaplatform.services')

View File

@ -3,6 +3,8 @@
#
"""IpaMetaImporter replaces this module with ipaplatform.$NAME.tasks.
"""
from __future__ import absolute_import
import ipaplatform._importhook
ipaplatform._importhook.fixup_module('ipaplatform.tasks')

View File

@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import os
import six

View File

@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import print_function
from __future__ import print_function, absolute_import
from contextlib import contextmanager
import logging

View File

@ -16,6 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import os
from ipalib import api

View File

@ -2,6 +2,8 @@
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
from ipalib.plugable import Registry
from ipaplatform import services
from ipaplatform.paths import paths

View File

@ -22,6 +22,8 @@
# Make sure we only run this module at the server where samba4-python
# package is installed to avoid issues with unavailable modules
from __future__ import absolute_import
import logging
import re
import time

View File

@ -2,6 +2,8 @@
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
from datetime import datetime
import logging

View File

@ -2,6 +2,8 @@
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
import logging
import ldap.dn

View File

@ -2,7 +2,7 @@
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
#
from __future__ import print_function
from __future__ import print_function, absolute_import
from binascii import hexlify
import collections

View File

@ -3,7 +3,7 @@
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
#
from __future__ import print_function
from __future__ import print_function, absolute_import
import collections
import os

View File

@ -6,7 +6,7 @@
AD trust installer module
"""
from __future__ import print_function
from __future__ import print_function, absolute_import
import logging
import os

View File

@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import print_function
from __future__ import print_function, absolute_import
import logging
import os

View File

@ -6,7 +6,7 @@
CA installer module
"""
from __future__ import print_function
from __future__ import print_function, absolute_import
import enum
import logging

View File

@ -19,7 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import print_function
from __future__ import print_function, absolute_import
import base64
import binascii

View File

@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import logging
import os
import stat

View File

@ -1,6 +1,6 @@
# Copyright (C) 2015 FreeIPa Project Contributors, see 'COPYING' for license.
from __future__ import print_function
from __future__ import print_function, absolute_import
import logging

View File

@ -2,7 +2,7 @@
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
#
from __future__ import print_function
from __future__ import print_function, absolute_import
import logging
import errno

View File

@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import base64
import logging

View File

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import print_function
from __future__ import print_function, absolute_import
import logging
import shutil

View File

@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import logging
import os
import shutil

View File

@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import print_function
from __future__ import print_function, absolute_import
import logging
import os

View File

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import print_function
from __future__ import print_function, absolute_import
import logging
import os

View File

@ -23,7 +23,7 @@
# TODO
# save undo files?
from __future__ import print_function
from __future__ import print_function, absolute_import
import logging
import os

View File

@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import abc
import base64
import datetime

View File

@ -2,7 +2,7 @@
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
#
from __future__ import print_function
from __future__ import print_function, absolute_import
import logging

View File

@ -2,6 +2,8 @@
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
from ipapython.install import cli
from ipapython.install.core import knob, extend_knob
from ipaplatform.paths import paths

View File

@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import logging
import os
import shutil

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import print_function
from __future__ import print_function, absolute_import
import os
import os.path

View File

@ -2,6 +2,8 @@
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
from ipapython.install import cli
from ipapython.install.core import extend_knob
from ipaplatform.paths import paths

View File

@ -2,6 +2,8 @@
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
import logging
from ipalib import api

View File

@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import logging
import gssapi

View File

@ -6,6 +6,8 @@
KRA installer module
"""
from __future__ import absolute_import
import os
import shutil

View File

@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import logging
import os
import pwd

View File

@ -2,6 +2,8 @@
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
import logging
import os
import pwd

View File

@ -2,6 +2,8 @@
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
import logging
import os
import pwd

View File

@ -17,6 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import absolute_import
import logging
from ipaserver.install import installutils, cainstance

View File

@ -2,6 +2,8 @@
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
import logging
from ipalib import errors

View File

@ -2,6 +2,8 @@
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
import logging
from ipalib.plugable import Registry

View File

@ -2,6 +2,8 @@
# Copyright (C) 2016 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
import logging
import os
import tempfile

View File

@ -17,8 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import print_function
from __future__ import absolute_import
from __future__ import print_function, absolute_import
import logging

View File

@ -2,7 +2,7 @@
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
from __future__ import print_function
from __future__ import print_function, absolute_import
import errno
import logging

View File

@ -2,7 +2,7 @@
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
from __future__ import print_function
from __future__ import print_function, absolute_import
import contextlib
import logging

View File

@ -2,7 +2,7 @@
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
from __future__ import print_function
from __future__ import print_function, absolute_import
import logging
import re

View File

@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import logging
import os
import os.path

View File

@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import absolute_import
import logging
import ldif

View File

@ -239,6 +239,8 @@ digits and nothing else follows.
'''
from __future__ import absolute_import
import datetime
import json
import logging

View File

@ -27,6 +27,8 @@ Backend plugin for LDAP.
# binding encodes them into the appropriate representation. This applies to
# everything except the CrudBackend methods, where dn is part of the entry dict.
from __future__ import absolute_import
import logging
import os

View File

@ -17,6 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import absolute_import
import logging
import re
from ldap import MOD_ADD

View File

@ -30,6 +30,8 @@ certificates via the following methods:
* `ra.take_certificate_off_hold()` - take a certificate off hold.
"""
from __future__ import absolute_import
from ipalib import Backend
from ipalib import errors
import os

View File

@ -2,6 +2,8 @@
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
import logging
import dbus

View File

@ -17,6 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import absolute_import
import logging
import posixpath
from copy import deepcopy

View File

@ -18,6 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import absolute_import
import logging
import time
from time import gmtime, strftime

View File

@ -23,6 +23,8 @@ RPC server.
Also see the `ipalib.rpc` module.
"""
from __future__ import absolute_import
import logging
from xml.sax.saxutils import escape
import os

View File

@ -1,6 +1,6 @@
# Copyright (C) 2015 IPA Project Contributors, see COPYING for license
from __future__ import print_function
from __future__ import print_function, absolute_import
# pylint: disable=relative-import
from custodia.message.kem import KEMClient, KEY_USAGE_SIG, KEY_USAGE_ENC
# pylint: enable=relative-import

View File

@ -1,6 +1,6 @@
# Copyright (C) 2015 IPA Project Contributors, see COPYING for license
from __future__ import print_function
from __future__ import print_function, absolute_import
import errno
import os

View File

@ -1,6 +1,6 @@
# Copyright (C) 2015 IPA Project Contributors, see COPYING for license
from __future__ import print_function
from __future__ import print_function, absolute_import
from base64 import b64encode, b64decode
from custodia.store.interface import CSStore # pylint: disable=relative-import
from jwcrypto.common import json_decode, json_encode

View File

@ -19,7 +19,7 @@
"""Pytest plugin for IPA Integration tests"""
from __future__ import print_function
from __future__ import print_function, absolute_import
import logging
import os

View File

@ -19,6 +19,8 @@
"""Common tasks for FreeIPA integration tests"""
from __future__ import absolute_import
import logging
import os
import textwrap

View File

@ -21,6 +21,8 @@
Base class for all cmdline tests
"""
from __future__ import absolute_import
import distutils.spawn
import os
import unittest

View File

@ -20,6 +20,8 @@
Test `ipa-getkeytab`
"""
from __future__ import absolute_import
import os
import shutil
import tempfile

View File

@ -20,6 +20,8 @@
Test the `ipaserver/install/ldapupdate.py` module.
"""
from __future__ import absolute_import
import os
import unittest

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function
from __future__ import print_function, absolute_import
import logging
import os

View File

@ -17,6 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import absolute_import
import functools
import logging
import os

View File

@ -2,6 +2,8 @@
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
import logging
import dns.dnssec

View File

@ -15,6 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import absolute_import
import re
import time

View File

@ -17,6 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import absolute_import
import logging
import os
import subprocess

View File

@ -2,6 +2,8 @@
# Copyright (C) 2016 FreeIPA Contributors see COPYING for license
#
from __future__ import absolute_import
import six
from ipatests.pytest_plugins.integration import tasks
from ipatests.test_integration.base import IntegrationTest

Some files were not shown because too many files have changed in this diff Show More