Skip to content

Commit fc0e36b

Browse files
Removed old path library used to validate client secret path while google authentication. #5750
1 parent c789045 commit fc0e36b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

web/pgadmin/misc/cloud/google/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import pickle
1212
import json
1313
import os
14-
from pathlib import Path
1514
from urllib.parse import unquote
1615

1716
from config import root
@@ -90,7 +89,7 @@ def verify_credentials():
9089
except Exception as e:
9190
return bad_request(errormsg=str(e))
9291

93-
if client_secret_path is not None and Path(client_secret_path).exists():
92+
if client_secret_path and os.path.exists(client_secret_path):
9493
with open(client_secret_path, 'r') as json_file:
9594
client_config = json.load(json_file)
9695

web/regression/feature_utils/pgadmin_page.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,16 @@ def reset_layout(self):
6262
self.driver.refresh()
6363
try:
6464
WebDriverWait(self.driver, 3).until(EC.alert_is_present())
65-
self.driver.switch_to_alert().accept()
65+
self.driver.switch_to.alert.accept()
6666
attempt = attempt + 1
6767
except TimeoutException:
6868
attempt = attempt + 1
6969

7070
self.click_element(self.find_by_css_selector(
7171
"li[data-label='Reset Layout']"))
72-
self.click_modal('OK')
72+
self.click_modal('Yes')
73+
if WebDriverWait(self.driver, 3).until(EC.alert_is_present()):
74+
self.driver.switch_to.alert.accept()
7375
self.wait_for_reloading_indicator_to_disappear()
7476

7577
def refresh_page(self):

0 commit comments

Comments
 (0)