Handles that are empty strings are standardized to None

svn: r23309
This commit is contained in:
Doug Blank 2013-10-11 17:24:29 +00:00
parent aae377636d
commit 8ee4695239

View File

@ -28,7 +28,10 @@ class Handle:
self.classname = classname self.classname = classname
if handle and not isinstance(handle, UNITYPE): if handle and not isinstance(handle, UNITYPE):
handle = handle.decode('utf-8') handle = handle.decode('utf-8')
if handle:
self.handle = handle self.handle = handle
else:
self.handle = None
def __repr__(self): def __repr__(self):
return "Handle(%s, %s)" % (self.classname, self.handle) return "Handle(%s, %s)" % (self.classname, self.handle)