Re: [PATCH v2 2/4] nmbug-status: Add meta.message-url config setting

Subject: Re: [PATCH v2 2/4] nmbug-status: Add meta.message-url config setting

Date: Wed, 23 Mar 2016 08:19:34 -0300

To: W. Trevor King, notmuch@notmuchmail.org

Cc:

From: David Bremner


"W. Trevor King" <wking@tremily.us> writes:

>  from __future__ import print_function
> @@ -232,6 +232,10 @@ class Page (object):
>  class HtmlPage (Page):
>      _slug_regexp = re.compile('\W+')
>  
> +    def __init__(self, message_url_template, **kwargs):
> +        self.message_url_template = message_url_template
> +        super(HtmlPage, self).__init__(**kwargs)
> +

> @@ -395,6 +400,8 @@ _PAGES['text'] = Page()
>  _PAGES['html'] = HtmlPage(
>      header=header_template.format(**context),
>      footer=footer_template.format(**context),
> +    message_url_template=config['meta'].get(
> +        'message-url', 'http://mid.gmane.org/{message-id}'),
>      )
>  

Maybe I'm missing some python knowledged, but it looks the constructor
is defined to take a regular argument for message_url_template, but only
passed in as a keyword. Does this really work?

d

Thread: