From 2952072b6d833c8250713baf85731858597fd40a Mon Sep 17 00:00:00 2001 From: pixelrebel Date: Thu, 4 Aug 2016 13:08:56 -0700 Subject: [PATCH] Declare token to mitigate 'no token' exception when connection fails. --- pyIsis/connection.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyIsis/connection.py b/pyIsis/connection.py index b3ac825..9fa1102 100644 --- a/pyIsis/connection.py +++ b/pyIsis/connection.py @@ -45,6 +45,9 @@ def __init__(self, hostname, username, password): self.hostname = hostname self.username = username self.password = password + + # must be present for __del__ to gracefully exit failed session + self.token = None url = ISIS_SOAP_URL.format(hostname=self.hostname, port=ISIS_SOAP_PORT)