def getAttributeValue_fragmented(self, obj_id, attr, allAsBinary=False):
<EOL>valTemplate = PyKCS11.LowLevel.ckattrlist(<NUM_LIT:1>)<EOL>res = []<EOL>for x in range(len(attr)):<EOL><INDENT>valTemplate[<NUM_LIT:0>].Reset()<EOL>valTemplate[<NUM_LIT:0>].SetType(attr[x])<EOL>rv = self.lib.C_GetAttributeValue(self.session, obj_id,<EOL>valTemplate)<EOL>if rv in (CKR_ATTRIBUTE_TYPE_INVALID,<EOL>CKR_ATTRIBUTE_SENSITIVE, CKR_ARGUMENTS_BAD):<EOL><INDENT>res.append(None)<EOL>continue<EOL><DEDENT>if rv != CKR_OK:<EOL><INDENT>raise PyKCS11Error(rv)<EOL><DEDENT>rv = self.lib.C_GetAttributeValue(self.session, obj_id,<EOL>valTemplate)<EOL>if rv != CKR_OK:<EOL><INDENT>raise PyKCS11Error(rv)<EOL><DEDENT>if allAsBinary:<EOL><INDENT>res.append(valTemplate[<NUM_LIT:0>].GetBin())<EOL><DEDENT>elif valTemplate[<NUM_LIT:0>].IsNum():<EOL><INDENT>res.append(valTemplate[<NUM_LIT:0>].GetNum())<EOL><DEDENT>elif valTemplate[<NUM_LIT:0>].IsBool():<EOL><INDENT>res.append(valTemplate[<NUM_LIT:0>].GetBool())<EOL><DEDENT>elif valTemplate[<NUM_LIT:0>].IsString():<EOL><INDENT>res.append(valTemplate[<NUM_LIT:0>].GetString())<EOL><DEDENT>elif valTemplate[<NUM_LIT:0>].IsBin():<EOL><INDENT>res.append(valTemplate[<NUM_LIT:0>].GetBin())<EOL><DEDENT>elif valTemplate[<NUM_LIT:0>].IsAttributeList():<EOL><INDENT>res.append(valTemplate[<NUM_LIT:0>].GetBin())<EOL><DEDENT>else:<EOL><INDENT>raise PyKCS11Error(-<NUM_LIT:2>)<EOL><DEDENT><DEDENT>return res<EOL>
Same as :func:`getAttributeValue` except that when some attribute
is sensitive or unknown an empty value (None) is returned.

Note: this is achived by getting attributes one by one.

:see: :func:`getAttributeValue`