Fix TAG_Byte_Array's setValue and dataType member functions

This commit is contained in:
Caleb Deveraux 2010-09-26 20:42:53 -06:00
parent 8eb6657408
commit fc87cc2e83

5
nbt.py
View File

@ -141,8 +141,9 @@ class TAG_Byte_Array(TAG_Value):
tag = 7; tag = 7;
fmt = ">i%ds" fmt = ">i%ds"
def setValue(self, val):
_value = numpy.array(val, uint8) def dataType(self, value):
return array(value, uint8)
def __repr__(self): def __repr__(self):
return "<%s: length %d> ( %s )" % (self.__class__, len(self.value), self.name) return "<%s: length %d> ( %s )" % (self.__class__, len(self.value), self.name)