summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
94a1bb8)
Rename the function to clarify its effect and remove all the comments
accompanying each call to the function.
Modified by Sebastian Spaeth to apply cleanly again and remove some
blank lines.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
_get_child_directories = nmlib.notmuch_directory_get_child_directories
_get_child_directories.restype = c_void_p
_get_child_directories = nmlib.notmuch_directory_get_child_directories
_get_child_directories.restype = c_void_p
- def _verify_dir_initialized(self):
+ def _assert_dir_is_initialized(self):
"""Raises a NotmuchError(STATUS.NOT_INITIALIZED) if dir_p is None"""
if self._dir_p is None:
raise NotmuchError(STATUS.NOT_INITIALIZED)
"""Raises a NotmuchError(STATUS.NOT_INITIALIZED) if dir_p is None"""
if self._dir_p is None:
raise NotmuchError(STATUS.NOT_INITIALIZED)
STATUS.NOT_INITIALIZED
The directory has not been initialized
"""
STATUS.NOT_INITIALIZED
The directory has not been initialized
"""
- #Raise a NotmuchError(STATUS.NOT_INITIALIZED) if the dir_p is None
- self._verify_dir_initialized()
-
+ self._assert_dir_is_initialized()
#TODO: make sure, we convert the mtime parameter to a 'c_long'
status = Directory._set_mtime(self._dir_p, mtime)
#TODO: make sure, we convert the mtime parameter to a 'c_long'
status = Directory._set_mtime(self._dir_p, mtime)
STATUS.NOT_INITIALIZED
The directory has not been initialized
"""
STATUS.NOT_INITIALIZED
The directory has not been initialized
"""
- #Raise a NotmuchError(STATUS.NOT_INITIALIZED) if self.dir_p is None
- self._verify_dir_initialized()
-
+ self._assert_dir_is_initialized()
return Directory._get_mtime(self._dir_p)
# Make mtime attribute a property of Directory()
return Directory._get_mtime(self._dir_p)
# Make mtime attribute a property of Directory()
The returned filenames will be the basename-entries only (not
complete paths.
"""
The returned filenames will be the basename-entries only (not
complete paths.
"""
- #Raise a NotmuchError(STATUS.NOT_INITIALIZED) if self._dir_p is None
- self._verify_dir_initialized()
-
+ self._assert_dir_is_initialized()
files_p = Directory._get_child_files(self._dir_p)
return Filenames(files_p, self)
files_p = Directory._get_child_files(self._dir_p)
return Filenames(files_p, self)
The returned filenames will be the basename-entries only (not
complete paths.
"""
The returned filenames will be the basename-entries only (not
complete paths.
"""
- #Raise a NotmuchError(STATUS.NOT_INITIALIZED) if self._dir_p is None
- self._verify_dir_initialized()
-
+ self._assert_dir_is_initialized()
files_p = Directory._get_child_directories(self._dir_p)
return Filenames(files_p, self)
files_p = Directory._get_child_directories(self._dir_p)
return Filenames(files_p, self)