From 986a092130a9a2681363b46e7ee7a05989b27213 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Sat, 23 Nov 2019 13:27:54 -0800 Subject: [PATCH] fixed == / != None --- osxphotos/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osxphotos/__init__.py b/osxphotos/__init__.py index c745ecbd..18bec3e4 100644 --- a/osxphotos/__init__.py +++ b/osxphotos/__init__.py @@ -46,7 +46,7 @@ _PHOTOS_5_VERSION = "6000" _TESTED_OS_VERSIONS = ["12", "13", "14", "15"] # set _debug = True to enable debug output -_debug = False +_debug = False logging.basicConfig( level=logging.DEBUG, format="%(asctime)s - %(levelname)s - %(filename)s - %(lineno)d - %(message)s", @@ -294,7 +294,7 @@ class PhotosDB: # this is a serialized CFData object photosurlref = pl["IPXDefaultLibraryURLBookmark"] - if photosurlref != None: + if photosurlref is not None: # use CFURLCreateByResolvingBookmarkData to de-serialize bookmark data into a CFURLRef photosurl = CoreFoundation.CFURLCreateByResolvingBookmarkData( kCFAllocatorDefault, photosurlref, 0, None, None, None, None @@ -425,7 +425,7 @@ class PhotosDB: + "RKVersion.filename not like '%.pdf' and RKVersion.isInTrash = 0" ) for person in c: - if person[0] == None: + if person[0] is None: # logger.debug(f"skipping person = None {person[1]}") continue if not person[1] in self._dbfaces_uuid: @@ -683,7 +683,7 @@ class PhotosDB: "AND ZGENERICASSET.ZTRASHEDSTATE = 0 AND ZGENERICASSET.ZKIND = 0 " ) for person in c: - if person[0] == None: + if person[0] is None: # logger.debug(f"skipping person = None {person[1]}") continue if not person[1] in self._dbfaces_uuid: