Skip to content

Commit 118cd90

Browse files
author
Release Manager
committed
sagemathgh-40388: Do not ignore env.py fallbacks for empty variables in config.py If a variable is set to the empty string in config.py, consider the fallbacks defined in env.py In particular, this fixes MATHJAX_DIR outside sage-the-distro URL: sagemath#40388 Reported by: Antonio Rojas Reviewer(s):
2 parents fa568a6 + a0f4e53 commit 118cd90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sage/env.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ def var(key: str, *fallbacks: Optional[str], force: bool = False) -> Optional[st
159159
except ImportError:
160160
pass
161161

162-
# Try all fallbacks in order as long as we don't have a value
162+
# Try all fallbacks in order as long as we don't have a non-empty value
163163
for f in fallbacks:
164-
if value is not None:
164+
if value not in (None, ""):
165165
break
166166
value = f
167167
SAGE_ENV[key] = value

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy