Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
kshcherban committed Jul 29, 2018
1 parent 9439dca commit 4c45944
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion acme_nginx/AcmeV1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions acme_nginx/AcmeV2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 4 additions & 2 deletions acme_nginx/client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import argparse
import logging
from .AcmeV1 import AcmeV1
from .AcmeV2 import AcmeV2


def set_arguments():
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 4c45944

Please sign in to comment.