Пример #1
0
def _load_attribute_privacy(resource: HasPrivacy, element: ElementTree.Element, tag: str) -> None:
    privacy_value = _load_attribute('privacy', element, tag)
    if privacy_value is None:
        return
    if privacy_value == 'private':
        resource.private = True
        return
    if privacy_value == 'public':
        resource.private = False
        return
    logging.getLogger().warning('The betty:privacy Gramps attribute must have a value of "public" or "private", but "%s" was given, which was ignored.' % privacy_value)
Пример #2
0
 def test_date(self) -> None:
     sut = HasPrivacy()
     self.assertIsNone(sut.private)
Пример #3
0
def _mark_private(has_privacy: HasPrivacy) -> None:
    # Do not change existing explicit privacy declarations.
    if has_privacy.private is None:
        has_privacy.private = True