diff --git a/acme_nginx/AcmeV1.py b/acme_nginx/AcmeV1.py index fb47951..187bc3e 100644 --- a/acme_nginx/AcmeV1.py +++ b/acme_nginx/AcmeV1.py @@ -7,7 +7,7 @@ from urllib.request import urlopen # Python 3 except ImportError: from urllib2 import urlopen # Python 2 -from Acme import Acme +from .Acme import Acme class AcmeV1(Acme): diff --git a/acme_nginx/AcmeV2.py b/acme_nginx/AcmeV2.py index 9dda97a..28c60f9 100644 --- a/acme_nginx/AcmeV2.py +++ b/acme_nginx/AcmeV2.py @@ -6,8 +6,8 @@ from urllib.request import urlopen, Request # Python 3 except ImportError: from urllib2 import urlopen, Request # Python 2 -from Acme import Acme -from DigitalOcean import DigitalOcean +from .Acme import Acme +from .DigitalOcean import DigitalOcean class AcmeV2(Acme): diff --git a/acme_nginx/client.py b/acme_nginx/client.py index 6137f25..867eba6 100644 --- a/acme_nginx/client.py +++ b/acme_nginx/client.py @@ -1,5 +1,7 @@ import argparse import logging +from .AcmeV1 import AcmeV1 +from .AcmeV2 import AcmeV2 def set_arguments(): @@ -75,13 +77,13 @@ def main(): logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', level=log_level) log = logging.getLogger('acme') if args.acmev1: - from AcmeV1 import AcmeV1 as Acme + Acme = AcmeV1 if args.staging: api_url = 'https://acme-staging.api.letsencrypt.org' else: api_url = 'https://acme-v01.api.letsencrypt.org' else: - from AcmeV2 import AcmeV2 as Acme + Acme = AcmeV2 if args.staging: api_url = 'https://acme-staging-v02.api.letsencrypt.org/directory' else: