Browse Source

Expanding on getCSRF to yield errors in Slicer (bug)

Andrej 4 years ago
parent
commit
ffbc676271
1 changed files with 2 additions and 2 deletions
  1. 2 2
      labkeyInterface.py

+ 2 - 2
labkeyInterface.py

@@ -143,12 +143,12 @@ class labkeyInterface:
             response=self.get(url)
             encoding=chardet.detect(response.data)['encoding']
             jsonData=json.loads(response.data.decode(encoding))
-            self.cookie=response.getheader('Set-Cookie')
         except AttributeError:
             print('Failed')
             return None
 
-        print('CSRF: {}'.format(jsonData['CSRF']))
+        self.cookie=response.getheader('Set-Cookie')
+        print('User: {} CSRF: {}'.format(jsonData['displayName'],jsonData['CSRF']))
         return jsonData["CSRF"]
 
     def getUserId(self):