RawHeader.get can return also string lists
Related: https://pagure.io/koji/issue/3713
This commit is contained in:
parent
9799a193c9
commit
a0ffd9f434
1 changed files with 8 additions and 0 deletions
|
|
@ -807,6 +807,14 @@ class RawHeader(object):
|
|||
elif dtype == 7:
|
||||
# raw data
|
||||
return self.header[pos:pos + count]
|
||||
elif dtype == 8:
|
||||
# string array
|
||||
result = []
|
||||
for i in range(count):
|
||||
end = self.header.find(six.b('\0'), pos)
|
||||
result.append(self.header[pos:end])
|
||||
pos = end + 1
|
||||
return result
|
||||
else:
|
||||
# XXX - not all valid data types are handled
|
||||
raise GenericError("Unable to read header data type: %x" % dtype)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue