Email: fix handling templates_path default value
This commit is contained in:
parent
93b06d6127
commit
d75a61b4e8
2 changed files with 3 additions and 3 deletions
|
@ -143,6 +143,7 @@ class EmailClient(
|
|||
section.add_option(
|
||||
StringOption,
|
||||
"templates_path",
|
||||
default=self._defaults["templates_path"],
|
||||
comment="Path to templates directory",
|
||||
)
|
||||
|
||||
|
|
|
@ -18,12 +18,11 @@ def main(argv=None): # pylint: disable=too-many-locals,too-many-statements
|
|||
config = Config(__doc__, __name__.replace(".", "_"))
|
||||
|
||||
email_client = EmailClient(config=config)
|
||||
email_client.configure()
|
||||
config.set_default(
|
||||
"email",
|
||||
email_client.set_default(
|
||||
"templates_path",
|
||||
os.path.join(os.path.dirname(os.path.realpath(__file__)), "email_templates"),
|
||||
)
|
||||
email_client.configure()
|
||||
|
||||
# Options parser
|
||||
parser = config.get_arguments_parser(description=__doc__)
|
||||
|
|
Loading…
Reference in a new issue