@@ -179,8 +179,7 @@ def _common_login_logic(self, credentials, continue_last_session, domain, read_o
179
179
self .api_version = login_res .data ["api-server-version" ]
180
180
return login_res
181
181
182
- def login_with_api_key (self , api_key , continue_last_session = False , domain = None , read_only = False ,
183
- payload = None ):
182
+ def login_with_api_key (self , api_key , continue_last_session = False , domain = None , read_only = False , payload = None ):
184
183
"""
185
184
performs a 'login' API call to the management server
186
185
@@ -349,7 +348,8 @@ def api_call(self, command, payload=None, sid=None, wait_for_task=True, timeout=
349
348
res = APIResponse ("" , False , err_message = err_message )
350
349
else :
351
350
res = APIResponse ("" , False , err_message = err )
352
- except (http_client .CannotSendRequest , http_client .BadStatusLine , ConnectionAbortedError , BrokenPipeError , IOError ) as e :
351
+ except (http_client .CannotSendRequest , http_client .BadStatusLine ,
352
+ ConnectionAbortedError , BrokenPipeError , IOError ) as e :
353
353
self .conn = self .create_https_connection ()
354
354
self .conn .request ("POST" , url , _data , _headers )
355
355
response = self .conn .getresponse ()
@@ -455,8 +455,8 @@ def gen_api_query(self, command, details_level="standard", container_keys=None,
455
455
for key in container_keys :
456
456
all_objects [key ] = []
457
457
iterations = 0 # number of times we've made an API call
458
- limit = 50 # page size to get for each api call
459
- offset = 0 # skip n objects in the database
458
+ limit = 50 # page size to get for each api call
459
+ offset = 0 # skip n objects in the database
460
460
if payload is None :
461
461
payload = {}
462
462
else :
@@ -591,7 +591,7 @@ def check_tasks_status(task_result):
591
591
:return:
592
592
"""
593
593
for task in task_result .data ["tasks" ]:
594
- if task ["status" ] == "failed" or task ["status" ] == "partially succeeded" or task ["status" ] == "in progress" :
594
+ if task ["status" ] == "failed" or task ["status" ] == "partially succeeded" or task ["status" ] == "in progress" :
595
595
task_result .set_success_status (False )
596
596
break
597
597
@@ -610,7 +610,7 @@ def check_fingerprint(self):
610
610
local_fingerprint = self .read_fingerprint_from_file (self .server )
611
611
server_fingerprint = self .get_server_fingerprint ()
612
612
613
- #Check if fingerprint is passed and matches
613
+ # Check if fingerprint is passed and matches
614
614
if self .fingerprint == server_fingerprint :
615
615
return True
616
616
0 commit comments