Py3: fix for lack of basestring

This commit is contained in:
DeepSOIC 2017-11-23 14:06:33 +03:00
parent 0b7e9afcd8
commit cd551a5ba7

View File

@ -49,6 +49,9 @@ class SubsequencingError_LinkValue(SubsequencingError):
# -----------------------</EXCEPTIONS>------------------------ # -----------------------</EXCEPTIONS>------------------------
# -----------------------<HELPER STUFF>----------------------- # -----------------------<HELPER STUFF>-----------------------
if not hasattr(__builtins__, "basestring"):
basestring = str #Py3 compatibility
class HashableShape(object): class HashableShape(object):
"Decorator for Part.Shape, that can be used as key in dicts. Based on isSame method." "Decorator for Part.Shape, that can be used as key in dicts. Based on isSame method."
def __init__(self, shape): def __init__(self, shape):