protect against possibly-missing STBlob32

This commit is contained in:
David Rose 2003-10-02 19:01:18 +00:00
parent 3573ccb9aa
commit f8d1734379
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@
self.addString(arg)
elif subatomicType == DCSubatomicType.STBlob:
self.addString(arg)
elif subatomicType == DCSubatomicType.STBlob32:
elif hasattr(DCSubatomicType, "STBlob32") and subatomicType == DCSubatomicType.STBlob32:
self.addString32(arg)
elif subatomicType == DCSubatomicType.STInt8array:
self.addUint16(len(arg))

View File

@ -26,7 +26,7 @@
retVal = self.getString()
elif subatomicType == DCSubatomicType.STBlob:
retVal = self.getString()
elif subatomicType == DCSubatomicType.STBlob32:
elif hasattr(DCSubatomicType, "STBlob32") and subatomicType == DCSubatomicType.STBlob32:
retVal = self.getString32()
elif subatomicType == DCSubatomicType.STInt8array:
len = self.getUint16()