Commit 4dbf8313 by Sebastian Annies

use is not None as propose by future

parent 837ce8c9
...@@ -38,7 +38,7 @@ class Tgt(models.Model): ...@@ -38,7 +38,7 @@ class Tgt(models.Model):
try: try:
response = page.read() response = page.read()
tree = ElementTree.fromstring(response) tree = ElementTree.fromstring(response)
if tree.find(CAS + 'proxySuccess', namespaces=NSMAP): if tree.find(CAS + 'proxySuccess', namespaces=NSMAP) is not None:
return tree.find(CAS + 'proxySuccess/' + CAS + 'proxyTicket' , namespaces=NSMAP).text return tree.find(CAS + 'proxySuccess/' + CAS + 'proxyTicket' , namespaces=NSMAP).text
else: else:
raise CasTicketException("Failed to get proxy ticket") raise CasTicketException("Failed to get proxy ticket")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment