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(
|
section.add_option(
|
||||||
StringOption,
|
StringOption,
|
||||||
"templates_path",
|
"templates_path",
|
||||||
|
default=self._defaults["templates_path"],
|
||||||
comment="Path to templates directory",
|
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(".", "_"))
|
config = Config(__doc__, __name__.replace(".", "_"))
|
||||||
|
|
||||||
email_client = EmailClient(config=config)
|
email_client = EmailClient(config=config)
|
||||||
email_client.configure()
|
email_client.set_default(
|
||||||
config.set_default(
|
|
||||||
"email",
|
|
||||||
"templates_path",
|
"templates_path",
|
||||||
os.path.join(os.path.dirname(os.path.realpath(__file__)), "email_templates"),
|
os.path.join(os.path.dirname(os.path.realpath(__file__)), "email_templates"),
|
||||||
)
|
)
|
||||||
|
email_client.configure()
|
||||||
|
|
||||||
# Options parser
|
# Options parser
|
||||||
parser = config.get_arguments_parser(description=__doc__)
|
parser = config.get_arguments_parser(description=__doc__)
|
||||||
|
|
Loading…
Reference in a new issue