@@ -155,29 +155,23 @@ def _exclude_disk(self, device, file_system, mount_point):
155155 mount_point = mount_point .rsplit (' ' , 1 )[0 ]
156156
157157 return (
158- self ._blacklist_disk (device , file_system , mount_point )
159- or not self ._whitelist_disk (device , file_system , mount_point )
158+ self ._disk_blacklisted (device , file_system , mount_point )
159+ or not self ._disk_whitelisted (device , file_system , mount_point )
160160 )
161161
162- def _whitelist_disk (self , device , file_system , mount_point ):
163- if not self ._whitelist_file_system (file_system ):
164- return False
165- elif not self ._whitelist_device (device ):
166- return False
167- elif not self ._whitelist_mount_point (mount_point ):
168- return False
169-
170- return True
171-
172- def _blacklist_disk (self , device , file_system , mount_point ):
173- if self ._blacklist_file_system (file_system ):
174- return True
175- elif self ._blacklist_device (device ):
176- return True
177- elif self ._blacklist_mount_point (mount_point ):
178- return True
162+ def _disk_whitelisted (self , device , file_system , mount_point ):
163+ return (
164+ self ._whitelist_file_system (file_system )
165+ and self ._whitelist_device (device )
166+ and self ._whitelist_mount_point (mount_point )
167+ )
179168
180- return False
169+ def _disk_blacklisted (self , device , file_system , mount_point ):
170+ return (
171+ self ._blacklist_file_system (file_system )
172+ or self ._blacklist_device (device )
173+ or self ._blacklist_mount_point (mount_point )
174+ )
181175
182176 def _whitelist_file_system (self , file_system ):
183177 if self ._file_system_whitelist is None :
0 commit comments