MCPcopy Create free account
hub / github.com/bleachbit/bleachbit / get_warning_preference

Method get_warning_preference

bleachbit/Options.py:342–353  ·  view source on GitHub ↗

Return whether a specific warning is already confirmed.

(self, key)

Source from the content-addressed store, hash-verified

340 return self.get_paths("custom/paths")
341
342 def get_warning_preference(self, key):
343 """Return whether a specific warning is already confirmed."""
344 section = "warnings"
345 if not self.config.has_section(section):
346 return False
347 if not self.config.has_option(section, key):
348 return False
349 try:
350 return self.config.getboolean(section, key)
351 except ValueError:
352 logger.exception("Error reading warning preference for %s", key)
353 return False
354
355 def remember_warning_preference(self, key):
356 """Persist that a specific warning was confirmed once."""

Callers 5

test_warningMethod · 0.80
_check_protected_pathMethod · 0.80
set_cleanerMethod · 0.80

Calls 1

has_optionMethod · 0.45