Fix the NULL pointer tests in the destructors of all classes and
Database.create.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
:raises: :exc:`NotmuchError` in case of any failure
(possibly after printing an error message on stderr).
"""
:raises: :exc:`NotmuchError` in case of any failure
(possibly after printing an error message on stderr).
"""
- if self._db is not None:
raise NotmuchError(message="Cannot create db, this Database() "
"already has an open one.")
raise NotmuchError(message="Cannot create db, this Database() "
"already has an open one.")
def __del__(self):
"""Close and free the Directory"""
def __del__(self):
"""Close and free the Directory"""
- if self._dir_p is not None:
self._destroy(self._dir_p)
self._destroy(self._dir_p)
def __del__(self):
"""Close and free the notmuch filenames"""
def __del__(self):
"""Close and free the notmuch filenames"""
- if self._files_p is not None:
self._destroy(self._files_p)
def __len__(self):
self._destroy(self._files_p)
def __len__(self):
def __del__(self):
"""Close and free the notmuch Message"""
def __del__(self):
"""Close and free the notmuch Message"""
- if self._msg is not None:
def __del__(self):
"""Close and free the notmuch Messages"""
def __del__(self):
"""Close and free the notmuch Messages"""
- if self._msgs is not None:
self._destroy(self._msgs)
def format_messages(self, format, indent=0, entire_thread=False):
self._destroy(self._msgs)
def format_messages(self, format, indent=0, entire_thread=False):
def __del__(self):
"""Close and free the Query"""
def __del__(self):
"""Close and free the Query"""
- if self._query is not None:
self._destroy(self._query)
self._destroy(self._query)
def __del__(self):
"""Close and free the notmuch tags"""
def __del__(self):
"""Close and free the notmuch tags"""
- if self._tags is not None:
self._destroy(self._tags)
self._destroy(self._tags)
def __del__(self):
"""Close and free the notmuch Thread"""
def __del__(self):
"""Close and free the notmuch Thread"""
- if self._thread is not None:
self._destroy(self._thread)
self._destroy(self._thread)
def __del__(self):
"""Close and free the notmuch Threads"""
def __del__(self):
"""Close and free the notmuch Threads"""
- if self._threads is not None:
self._destroy(self._threads)
self._destroy(self._threads)