From 0220b0eaff574a9e26a39bca7c9fd58825fc8b01 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Sat, 7 Dec 2019 21:03:48 -0800 Subject: [PATCH] refactored code for unknown persons in Photos 5 --- osxphotos/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/osxphotos/__init__.py b/osxphotos/__init__.py index 53906c60..99335337 100644 --- a/osxphotos/__init__.py +++ b/osxphotos/__init__.py @@ -778,13 +778,9 @@ class PhotosDB: "AND ZGENERICASSET.ZTRASHEDSTATE = 0 AND ZGENERICASSET.ZKIND = 0 " ) for person in c: - person_name = None if person[0] is None: continue - if person[0] == "": - person_name = _UNKNOWN_PERSON - else: - person_name = person[0] + person_name = person[0] if person[0] != "" else _UNKNOWN_PERSON if not person[1] in self._dbfaces_uuid: self._dbfaces_uuid[person[1]] = [] if not person_name in self._dbfaces_person: