From 8808dadbaf158024b0dcbefb35d229660424c2d8 Mon Sep 17 00:00:00 2001 From: Kishi85 Date: Mon, 18 Feb 2019 20:45:28 +0100 Subject: [PATCH] Optimize imports --- acertmgr.py | 2 +- configuration.py | 1 - modes/dns/nsupdate.py | 3 +-- modes/standalone.py | 1 - modes/webdir.py | 2 +- tools.py | 4 ++-- 6 files changed, 5 insertions(+), 8 deletions(-) diff --git a/acertmgr.py b/acertmgr.py index 3ff7386..a7ad307 100755 --- a/acertmgr.py +++ b/acertmgr.py @@ -6,9 +6,9 @@ # Copyright (c) Rudolf Mayerhofer, 2019. # available under the ISC license, see LICENSE -import io import grp import importlib +import io import os import pwd import shutil diff --git a/configuration.py b/configuration.py index 802ce08..551e44b 100644 --- a/configuration.py +++ b/configuration.py @@ -11,7 +11,6 @@ import io import os import tools -import io ACME_DIR = "/etc/acme" ACME_CONF = os.path.join(ACME_DIR, "acme.conf") diff --git a/modes/dns/nsupdate.py b/modes/dns/nsupdate.py index c595a06..7997566 100644 --- a/modes/dns/nsupdate.py +++ b/modes/dns/nsupdate.py @@ -5,11 +5,11 @@ # Copyright (c) Rudolf Mayerhofer, 2019 # available under the ISC license, see LICENSE import datetime +import io import ipaddress import re import socket import time -import io import dns import dns.query @@ -19,7 +19,6 @@ import dns.update from modes.dns.abstract import DNSChallengeHandler - DEFAULT_KEY_ALGORITHM = "HMAC-MD5.SIG-ALG.REG.INT" diff --git a/modes/standalone.py b/modes/standalone.py index 687dd37..51c2357 100644 --- a/modes/standalone.py +++ b/modes/standalone.py @@ -20,7 +20,6 @@ import os import threading from modes.webdir import ChallengeHandler as WebChallengeHandler -import datetime # @brief custom request handler for ACME challenges diff --git a/modes/webdir.py b/modes/webdir.py index 1be2dcc..f3cc1c0 100644 --- a/modes/webdir.py +++ b/modes/webdir.py @@ -9,7 +9,7 @@ import datetime import os from modes.abstract import AbstractChallengeHandler -import datetime + try: from urllib.request import urlopen # Python 3 except ImportError: diff --git a/tools.py b/tools.py index adebe74..156aa2c 100644 --- a/tools.py +++ b/tools.py @@ -9,11 +9,11 @@ import base64 import binascii import datetime -import os import hashlib import io -import six +import os +import six from cryptography import x509 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes, serialization