Use if-else instead boolean operators

This commit is contained in:
Unrud 2018-04-29 21:39:31 +02:00
parent 6e73a1bebf
commit ff287c2e5d

View File

@ -230,8 +230,8 @@ def get_etag(text):
def get_uid(vobject_component):
"""UID value of an item if defined."""
return ((hasattr(vobject_component, "uid") or None) and
vobject_component.uid.value)
return (vobject_component.uid.value
if hasattr(vobject_component, "uid") else None)
def get_uid_from_object(vobject_item):