ticket = response.content
if ticket == b'-1' or not ticket:
raise NoResultsException('Ticket generation was not complete (returned "-1"), check Tableau Server trusted authorization configurations')
else:
return ticket
or (when you expect this method to return str):
ticket = response.content.decode()
if ticket == '-1' or not ticket:
raise NoResultsException('Ticket generation was not complete (returned "-1"), check Tableau Server trusted authorization configurations')
else:
return ticket
TableauHTTP#get_trusted_ticket_for_user doesn't raise an exception when the
response.content == b'-1'
.https://github.com/bryantbhowell/tableau_tools/blob/f04234ef93109543025f990f6e79f8da6f567b05/tableau_http.py#L22
should be:
or (when you expect this method to return str):