<commit_before>import os, sys, logging
from subprocess import Popen, PIPE
from helpers import *

def generateCertificates(config_object, domain_objects):
    certbot_binary_path = config_object['certbot_binary_path']
    certbot_arguments = config_object['certbot_arguments']
    hash_file_directory = config_object['hash_file_directory']

    for primary_domain, config in domain_objects.iteritems():
        if 'additional_domains' in config:
            config_hash = generateHash(primary_domain, config['additional_domains'])
        else:
            config_hash = generateHash(primary_domain)

        saved_hash = getSavedHash(primary_domain, hash_file_directory)

        if saved_hash != config_hash:
            print "Making some certs!"

            command = certbot_binary_path + ' certonly ' + certbot_arguments
            command = command + " -d " + primary_domain

            if 'additional_domains' in config:
                for additional_domain in config['additional_domains']:
                    command = command + ' -d ' + additional_domain

            p = Popen(command, shell=True, stdout=PIPE)
            output = p.communicate()[0]

            if p.returncode != 0:
                logError("Unable to generate certificate(s). Command:" + command)
            else:<commit_msg>make log messages more clear when generating certificates<commit_after>import os, sys, logging
from subprocess import Popen, PIPE
from helpers import *

def generateCertificates(config_object, domain_objects):
    certbot_binary_path = config_object['certbot_binary_path']
    certbot_arguments = config_object['certbot_arguments']
    hash_file_directory = config_object['hash_file_directory']

    for primary_domain, config in domain_objects.iteritems():
        if 'additional_domains' in config:
            config_hash = generateHash(primary_domain, config['additional_domains'])
        else:
            config_hash = generateHash(primary_domain)

        saved_hash = getSavedHash(primary_domain, hash_file_directory)

        if saved_hash != config_hash:
            print primary_domain + ": Generating certificate(s)"

            command = certbot_binary_path + ' certonly ' + certbot_arguments
            command = command + " -d " + primary_domain

            if 'additional_domains' in config:
                for additional_domain in config['additional_domains']:
                    command = command + ' -d ' + additional_domain

            p = Popen(command, shell=True, stdout=PIPE)
            output = p.communicate()[0]

            if p.returncode != 0:
                logError("Unable to generate certificate(s). Command:" + command)
            else:
{'fraction_non_alphanumeric': 0.08129175946547884, 'fraction_numerical': 0.0014847809948032665, 'mean_word_length': 2.88328530259366, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6216190', 'n_tokens_mistral': 727, 'n_tokens_neox': 686, 'n_words': 170}