From dbfaa680ce89ae18642e6ce3c76b39157db3a246 Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Wed, 15 Apr 2015 11:17:41 +0100 Subject: fix: dont overwrite default re-flag 0 with None issue #764 --- alot/addressbook/external.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'alot/addressbook/external.py') diff --git a/alot/addressbook/external.py b/alot/addressbook/external.py index da9aab59..5c88b291 100644 --- a/alot/addressbook/external.py +++ b/alot/addressbook/external.py @@ -11,7 +11,7 @@ from . import AddressBook, AddressbookError class ExternalAddressbook(AddressBook): """:class:`AddressBook` that parses a shell command's output""" - def __init__(self, commandline, regex, reflags=None, + def __init__(self, commandline, regex, reflags=0, external_filtering=True, **kwargs): """ @@ -21,7 +21,10 @@ class ExternalAddressbook(AddressBook): output to stdout. Must define subparts named "email" and "name". :type regex: str - :param reflags: flags to use with regular expression + :param reflags: flags to use with regular expression. + Use the constants defined in :mod:`re` here + (`re.IGNORECASE` etc.) + :type reflags: str :param external_filtering: if True the command is fired with the given search string as parameter and the result is not filtered further. -- cgit v1.2.3