I ran into an issue catching a None object delivered by rs.DocumentPath(). I wish to catch whether the user is working in a saved or non saved file and need the path if it is saved. However the rs.DocumentPath() returns a string type None if the file is not saved yet. If I try to catch that None object it fails with all 4 versions below. The debugger tells me the None returned is a string.
strPath=rs.DocumentPath() if strPath is "None": #if strPath is None: #if strPath==None: #if strPath=="None": print "No document path, abnormal..."
Any help here please ?