Rename mailgate.py to core.py
This commit is contained in:
parent
4bdbd0febb
commit
8f8d9dc1b6
4 changed files with 9 additions and 9 deletions
|
@ -31,7 +31,7 @@ conf.load_config()
|
|||
lacre.init_logging(conf.get_item('logging', 'config'))
|
||||
|
||||
# This has to be executed *after* logging initialisation.
|
||||
import lacre.mailgate as mailgate
|
||||
import lacre.core as core
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -47,7 +47,7 @@ from_addr = raw_message['From']
|
|||
to_addrs = sys.argv[1:]
|
||||
|
||||
# Let's start
|
||||
mailgate.deliver_message(raw_message, from_addr, to_addrs)
|
||||
(elapsed_s, process_t) = mailgate.exec_time_info(start)
|
||||
core.deliver_message(raw_message, from_addr, to_addrs)
|
||||
(elapsed_s, process_t) = core.exec_time_info(start)
|
||||
|
||||
LOG.info("Elapsed-time: {elapsed:.2f}s; Process-time: {process:.4f}s".format(elapsed=elapsed_s, process=process_t))
|
||||
|
|
|
@ -24,7 +24,7 @@ conf.load_config()
|
|||
lacre.init_logging(conf.get_item("logging", "config"))
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
import lacre.mailgate as gate
|
||||
import lacre.core as gate
|
||||
import lacre.keyring as kcache
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ There are 3 operations available:
|
|||
"""
|
||||
|
||||
import logging
|
||||
import lacre.mailgate as mailgate
|
||||
import lacre.core as core
|
||||
from email.message import Message
|
||||
|
||||
|
||||
|
@ -72,9 +72,9 @@ class InlineOpenPGPEncrypt(OpenPGPEncrypt):
|
|||
def perform(self, msg: Message):
|
||||
"""Encrypt with PGP Inline."""
|
||||
LOG.debug('Sending PGP/Inline...')
|
||||
return mailgate._gpg_encrypt_and_return(msg,
|
||||
return core._gpg_encrypt_and_return(msg,
|
||||
self._keys, self._recipients,
|
||||
mailgate._encrypt_all_payloads_inline)
|
||||
core._encrypt_all_payloads_inline)
|
||||
|
||||
|
||||
class MimeOpenPGPEncrypt(OpenPGPEncrypt):
|
||||
|
@ -87,9 +87,9 @@ class MimeOpenPGPEncrypt(OpenPGPEncrypt):
|
|||
def perform(self, msg: Message):
|
||||
"""Encrypt with PGP MIME."""
|
||||
LOG.debug('Sending PGP/MIME...')
|
||||
return mailgate._gpg_encrypt_and_return(msg,
|
||||
return core._gpg_encrypt_and_return(msg,
|
||||
self._keys, self._recipients,
|
||||
mailgate._encrypt_all_payloads_mime)
|
||||
core._encrypt_all_payloads_mime)
|
||||
|
||||
|
||||
class SMimeEncrypt(MailOperation):
|
||||
|
|
Loading…
Reference in a new issue