Skip to content

Commit c3db536

Browse files
Merge pull request #92 from ServiceNow/port_yoko
bug fix
2 parents f48fbef + 93c77b6 commit c3db536

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/browsergym/workarena/install.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,13 +790,20 @@ def disable_password_policies():
790790
set_sys_property(
791791
instance=SNowInstance(), property_name="glide.apply.password_policy.on_login", value="false"
792792
)
793-
# The following is not supported on developer portal instances
794-
if not _is_dev_portal_instance():
793+
# Exception handling since this property is sometimes read-only on some instances
794+
try:
795795
set_sys_property(
796796
instance=SNowInstance(),
797797
property_name="glide.authenticate.api.user.reset_password.mandatory",
798798
value="false",
799799
)
800+
except Exception:
801+
logging.warning(
802+
"Warning: Failed to set sys property "
803+
"'glide.authenticate.api.user.reset_password.mandatory'. Continuing.",
804+
exc_info=True,
805+
)
806+
800807
logging.info("Password policies disabled.")
801808

802809

0 commit comments

Comments
 (0)