Removed old path library used to validate client secret path while google authentication. #5750

pull/6027/head
Yogesh Mahajan 2023-03-28 11:27:16 +05:30 committed by GitHub
parent c78904501d
commit fc0e36b313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -11,7 +11,6 @@
import pickle import pickle
import json import json
import os import os
from pathlib import Path
from urllib.parse import unquote from urllib.parse import unquote
from config import root from config import root
@ -90,7 +89,7 @@ def verify_credentials():
except Exception as e: except Exception as e:
return bad_request(errormsg=str(e)) return bad_request(errormsg=str(e))
if client_secret_path is not None and Path(client_secret_path).exists(): if client_secret_path and os.path.exists(client_secret_path):
with open(client_secret_path, 'r') as json_file: with open(client_secret_path, 'r') as json_file:
client_config = json.load(json_file) client_config = json.load(json_file)

View File

@ -62,14 +62,16 @@ class PgadminPage:
self.driver.refresh() self.driver.refresh()
try: try:
WebDriverWait(self.driver, 3).until(EC.alert_is_present()) WebDriverWait(self.driver, 3).until(EC.alert_is_present())
self.driver.switch_to_alert().accept() self.driver.switch_to.alert.accept()
attempt = attempt + 1 attempt = attempt + 1
except TimeoutException: except TimeoutException:
attempt = attempt + 1 attempt = attempt + 1
self.click_element(self.find_by_css_selector( self.click_element(self.find_by_css_selector(
"li[data-label='Reset Layout']")) "li[data-label='Reset Layout']"))
self.click_modal('OK') self.click_modal('Yes')
if WebDriverWait(self.driver, 3).until(EC.alert_is_present()):
self.driver.switch_to.alert.accept()
self.wait_for_reloading_indicator_to_disappear() self.wait_for_reloading_indicator_to_disappear()
def refresh_page(self): def refresh_page(self):