- def __init__(self, username=None, password=None, **kwargs):
- if 'session' in kwargs:
- self.auth= { 'AuthMethod' : 'session',
- 'session' : kwargs['session'] }
- else:
- if username==None and password==None:
- self.auth = {'AuthMethod': "anonymous"}
- else:
- self.auth = {'Username' : username,
- 'AuthMethod' : 'password',
- 'AuthString' : password}
+ def __init__(self, username=None, password=None, **kwargs):
+ if 'session' in kwargs:
+ self.auth= { 'AuthMethod' : 'session',
+ 'session' : kwargs['session'] }
+ else:
+ if username==None and password==None:
+ self.auth = {'AuthMethod': "anonymous"}
+ else:
+ self.auth = {'Username' : username,
+ 'AuthMethod' : 'password',
+ 'AuthString' : password}