From 995303c21bb5012b7eeaa1fe5fd15ae175bfa1e6 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Thu, 16 Jun 2011 15:51:13 +0200 Subject: [PATCH] python: Bulletproof Database() path parameter libnotmuch (and python) crashed when I accidently passed in an invalid value as path argument to the Database() instantiation. Therefore, we now check via assert that the handed in path is actually a real string (or None). Signed-off-by: Sebastian Spaeth --- bindings/python/notmuch/database.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py index 9016f0ae..926bac63 100644 --- a/bindings/python/notmuch/database.py +++ b/bindings/python/notmuch/database.py @@ -100,6 +100,7 @@ class Database(object): Database._std_db_path = self._get_user_default_db() path = Database._std_db_path + assert isinstance(path, basestring), 'Path needs to be a string or None.' if create == False: self.open(path, mode) else: -- 2.43.0