diff options
author | Christian Heimes <cheimes@redhat.com> | 2015-08-16 19:00:00 +0200 |
---|---|---|
committer | Christian Heimes <cheimes@redhat.com> | 2015-08-17 21:14:11 +0200 |
commit | 71148b8f79a5d6ba0c949a3ca0acf5aec6321f0a (patch) | |
tree | 2ae9b55f25b94c5f90b114de17c1e442499a3872 /base/common/python/pki | |
parent | 5935b765aaeb0f30844812db057020b1aaea4559 (diff) | |
download | pki-71148b8f79a5d6ba0c949a3ca0acf5aec6321f0a.tar.gz pki-71148b8f79a5d6ba0c949a3ca0acf5aec6321f0a.tar.xz pki-71148b8f79a5d6ba0c949a3ca0acf5aec6321f0a.zip |
Py3 modernization: libmodernize.fixes.fix_import
Enforce absolute imports or explicit relative imports. Python 3 no
longer supports implicit relative imports, that is unqualified imports
from a module's directory. In order to load a module from the same
directory inside a package, use
from . import module
The future feature 'from __future__ import absolute_import' ensures that
pki uses absolute imports on Python 2, too.
See https://www.python.org/dev/peps/pep-0328/
Diffstat (limited to 'base/common/python/pki')
-rw-r--r-- | base/common/python/pki/__init__.py | 1 | ||||
-rw-r--r-- | base/common/python/pki/account.py | 1 | ||||
-rw-r--r-- | base/common/python/pki/cert.py | 1 | ||||
-rw-r--r-- | base/common/python/pki/cli.py | 1 | ||||
-rw-r--r-- | base/common/python/pki/client.py | 1 | ||||
-rw-r--r-- | base/common/python/pki/crypto.py | 1 | ||||
-rw-r--r-- | base/common/python/pki/encoder.py | 1 | ||||
-rw-r--r-- | base/common/python/pki/key.py | 1 | ||||
-rw-r--r-- | base/common/python/pki/kra.py | 1 | ||||
-rw-r--r-- | base/common/python/pki/profile.py | 1 | ||||
-rw-r--r-- | base/common/python/pki/system.py | 1 | ||||
-rw-r--r-- | base/common/python/pki/systemcert.py | 1 | ||||
-rw-r--r-- | base/common/python/pki/upgrade.py | 1 | ||||
-rw-r--r-- | base/common/python/pki/util.py | 1 |
14 files changed, 14 insertions, 0 deletions
diff --git a/base/common/python/pki/__init__.py b/base/common/python/pki/__init__.py index 77e5b2365..a6f01ff82 100644 --- a/base/common/python/pki/__init__.py +++ b/base/common/python/pki/__init__.py @@ -21,6 +21,7 @@ """ This module contains top-level classes and functions used by the Dogtag project. """ +from __future__ import absolute_import from functools import wraps import os import re diff --git a/base/common/python/pki/account.py b/base/common/python/pki/account.py index c8c7cd78b..9125df875 100644 --- a/base/common/python/pki/account.py +++ b/base/common/python/pki/account.py @@ -18,6 +18,7 @@ # Copyright (C) 2013 Red Hat, Inc. # All rights reserved. # +from __future__ import absolute_import import pki diff --git a/base/common/python/pki/cert.py b/base/common/python/pki/cert.py index 575491ffe..5590b35ee 100644 --- a/base/common/python/pki/cert.py +++ b/base/common/python/pki/cert.py @@ -20,6 +20,7 @@ # Abhishek Koneru <akoneru@redhat.com> # Ade Lee <alee@redhat.com> +from __future__ import absolute_import import copy import json diff --git a/base/common/python/pki/cli.py b/base/common/python/pki/cli.py index 12b8656e8..dd8b388fb 100644 --- a/base/common/python/pki/cli.py +++ b/base/common/python/pki/cli.py @@ -19,6 +19,7 @@ # All rights reserved. # +from __future__ import absolute_import import collections import getopt import sys diff --git a/base/common/python/pki/client.py b/base/common/python/pki/client.py index d28a41d63..7f59c2f2a 100644 --- a/base/common/python/pki/client.py +++ b/base/common/python/pki/client.py @@ -19,6 +19,7 @@ # All rights reserved. # +from __future__ import absolute_import import functools import warnings diff --git a/base/common/python/pki/crypto.py b/base/common/python/pki/crypto.py index 2a33f0638..9c1c0f881 100644 --- a/base/common/python/pki/crypto.py +++ b/base/common/python/pki/crypto.py @@ -21,6 +21,7 @@ """ Module containing crypto classes. """ +from __future__ import absolute_import import abc import nss.nss as nss import os diff --git a/base/common/python/pki/encoder.py b/base/common/python/pki/encoder.py index 6d5725f0f..cebcc566b 100644 --- a/base/common/python/pki/encoder.py +++ b/base/common/python/pki/encoder.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import json TYPES = {} diff --git a/base/common/python/pki/key.py b/base/common/python/pki/key.py index 0df868657..3433bce03 100644 --- a/base/common/python/pki/key.py +++ b/base/common/python/pki/key.py @@ -24,6 +24,7 @@ Module containing the Python client classes for the KeyClient and KeyRequestClient REST API on a DRM """ +from __future__ import absolute_import import base64 import json import urllib diff --git a/base/common/python/pki/kra.py b/base/common/python/pki/kra.py index 9e46235d2..ca756c3c1 100644 --- a/base/common/python/pki/kra.py +++ b/base/common/python/pki/kra.py @@ -25,6 +25,7 @@ to interact with the DRM to expose the functionality of the KeyClient and KeyRequestResource REST APIs. """ +from __future__ import absolute_import import pki.key as key from pki.systemcert import SystemCertClient diff --git a/base/common/python/pki/profile.py b/base/common/python/pki/profile.py index 00318d0f2..70eec4083 100644 --- a/base/common/python/pki/profile.py +++ b/base/common/python/pki/profile.py @@ -17,6 +17,7 @@ # # @author: Abhishek Koneru <akoneru@redhat.com> +from __future__ import absolute_import import json import os diff --git a/base/common/python/pki/system.py b/base/common/python/pki/system.py index b3d5fc641..f1128fca1 100644 --- a/base/common/python/pki/system.py +++ b/base/common/python/pki/system.py @@ -19,6 +19,7 @@ # All rights reserved. # +from __future__ import absolute_import import pki.encoder as encoder import xml.etree.ElementTree as ETree import os diff --git a/base/common/python/pki/systemcert.py b/base/common/python/pki/systemcert.py index b5f7b03b8..4adc2f18e 100644 --- a/base/common/python/pki/systemcert.py +++ b/base/common/python/pki/systemcert.py @@ -21,6 +21,7 @@ """ Module containing the Python client classes for the SystemCert REST API """ +from __future__ import absolute_import import base64 import pki from pki.cert import CertData diff --git a/base/common/python/pki/upgrade.py b/base/common/python/pki/upgrade.py index 010f88c81..1206ef8ba 100644 --- a/base/common/python/pki/upgrade.py +++ b/base/common/python/pki/upgrade.py @@ -19,6 +19,7 @@ # All rights reserved. # +from __future__ import absolute_import import functools import os import re diff --git a/base/common/python/pki/util.py b/base/common/python/pki/util.py index 19f6be720..55fa3b317 100644 --- a/base/common/python/pki/util.py +++ b/base/common/python/pki/util.py @@ -23,6 +23,7 @@ Module containing utility functions and classes for the Dogtag python code """ +from __future__ import absolute_import import os import shutil |