@@ -179,8 +179,7 @@ def _common_login_logic(self, credentials, continue_last_session, domain, read_o
179179 self .api_version = login_res .data ["api-server-version" ]
180180 return login_res
181181
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 ):
184183 """
185184 performs a 'login' API call to the management server
186185
@@ -349,7 +348,8 @@ def api_call(self, command, payload=None, sid=None, wait_for_task=True, timeout=
349348 res = APIResponse ("" , False , err_message = err_message )
350349 else :
351350 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 :
353353 self .conn = self .create_https_connection ()
354354 self .conn .request ("POST" , url , _data , _headers )
355355 response = self .conn .getresponse ()
@@ -455,8 +455,8 @@ def gen_api_query(self, command, details_level="standard", container_keys=None,
455455 for key in container_keys :
456456 all_objects [key ] = []
457457 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
460460 if payload is None :
461461 payload = {}
462462 else :
@@ -591,7 +591,7 @@ def check_tasks_status(task_result):
591591 :return:
592592 """
593593 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" :
595595 task_result .set_success_status (False )
596596 break
597597
@@ -610,7 +610,7 @@ def check_fingerprint(self):
610610 local_fingerprint = self .read_fingerprint_from_file (self .server )
611611 server_fingerprint = self .get_server_fingerprint ()
612612
613- #Check if fingerprint is passed and matches
613+ # Check if fingerprint is passed and matches
614614 if self .fingerprint == server_fingerprint :
615615 return True
616616
0 commit comments