diff options
Diffstat (limited to 'alot/db/manager.py')
-rw-r--r-- | alot/db/manager.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/alot/db/manager.py b/alot/db/manager.py index 3e84a6b1..a1c0b8ed 100644 --- a/alot/db/manager.py +++ b/alot/db/manager.py @@ -398,7 +398,7 @@ class DBManager(object): db = Database(path=self.path, mode=mode) return db.create_query(querystring) - def add_message(self, path, tags=[], afterwards=None): + def add_message(self, path, tags=None, afterwards=None): """ Adds a file to the notmuch index. @@ -409,6 +409,8 @@ class DBManager(object): :param afterwards: callback to trigger after adding :type afterwards: callable or None """ + tags = tags or [] + if self.ro: raise DatabaseROError() if not is_subdir_of(path, self.path): |