riverbed/steelscript-netprofiler

logout method is not working anymore?

marwanabdelhadi opened this issue · 2 comments

I am trying to fire logout method after i finished my report as following:

p.logout()

but it give me the following exception:

Traceback (most recent call last):
File "C:/Users/abdelhm/PycharmProjects/NetProfiler SteelScript/Aviva_report.py", line 78, in
p1.logout()
File "C:\Python27\lib\site-packages\steelscript\netprofiler\core\netprofiler.py", line 374, in logout
super(NetProfiler, self).logout()
File "C:\Python27\lib\site-packages\steelscript\common\service.py", line 156, in logout
self.conn.del_headers(['Authorization', 'Cookie'])
AttributeError: 'Connection' object has no attribute 'del_headers'

Wow, that is a bug that's been there since we accidentally dropped the del_headers method a long time ago. It's not typically required to logout via the REST API, hence we haven't touched that method and seen the error.

If you are running reports as different users in the same script, one workaround would be to create a new Profiler instance with the updated credentials. Otherwise, it should be fine to just ignore the logout method.

Thanks a lot Mike, I will create different object for each user better.