close
Skip to content

Commit 7da8c75

Browse files
Make debug feature flag optional with LOCAL_DEV (#13293)
Co-authored-by: RayBB <RayBB@users.noreply.github.com>
1 parent ae90ef6 commit 7da8c75

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

‎openlibrary/plugins/openlibrary/code.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ def internalerror():
10301030
if sentry.enabled:
10311031
sentry_event_id = sentry.capture_exception_webpy()
10321032

1033-
if features.is_enabled("debug"):
1033+
if get_ol_env().LOCAL_DEV or features.is_enabled("debug"):
10341034
raise web.debugerror()
10351035
else:
10361036
msg = render.site(

‎openlibrary/plugins/upstream/utils.py‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from infogami.infobase import client
4040
from infogami.infobase.client import Changeset, Nothing, Thing, storify
4141
from infogami.infobase.common import parse_query
42-
from infogami.utils import delegate, features, stats, view
42+
from infogami.utils import delegate, stats, view
4343
from infogami.utils.context import InfogamiContext, context
4444
from infogami.utils.macro import macro
4545
from infogami.utils.view import (
@@ -301,11 +301,6 @@ def json_encode(d, indent: int | str | None = None, sort_keys: bool = False) ->
301301
return json.dumps(d, indent=indent, sort_keys=sort_keys).replace("<", "\\u003c").replace(">", "\\u003e")
302302

303303

304-
@public
305-
def is_feature_enabled(feature_name: str) -> bool:
306-
return features.is_enabled(feature_name)
307-
308-
309304
def unflatten(d: dict, separator: str = "--") -> Storage | list[Any]:
310305
"""Convert flattened data into nested form.
311306

0 commit comments

Comments
 (0)