Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lecm/certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ def generate(self):
self._create_account_key()
self._create_private_key()
self._create_csr()
os.makedirs('%s/challenges/%s' % (self.path, self.name))
if not os.path.exists('%s/challenges/%s' % (self.path, self.name)):
os.makedirs('%s/challenges/%s' % (self.path, self.name))
self._create_certificate()

def renew(self):
Expand Down
4 changes: 2 additions & 2 deletions lecm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from prettytable import PrettyTable
from OpenSSL import crypto
from distro import linux_distribution

import copy
import logging
Expand Down Expand Up @@ -45,8 +46,7 @@ def filter_certificates(items, certificates):


def enforce_selinux_context(output_directory):

if platform.dist()[0] in ['fedora', 'centos', 'redhat']:
if linux_distribution()[0] in ['fedora', 'centos', 'redhat']:
if os.path.exists('/sbin/semanage'):
FNULL = open(os.devnull, 'w')

Expand Down