Commits

Bob Ippolito  committed ace2ba7

check for None first, in case NSNull.null() somehow returns nil,
it will still work

  • Participants
  • Parent commits 4efac89
  • Branches pyobjc-ancient

Comments (0)

Files changed (1)

File Lib/objc/_convenience.py

     return v
 
 def container_unwrap(v, exc_type, *exc_args):
-    if v is null:
+    if v is None:
+        raise exc_type(*exc_args)
+    elif v is null:
         return None
-    elif v is None:
-        raise exc_type(*exc_args)
     return v
 
 #