Skip to content

Commit b07cf96

Browse files
committed
Ignore asset-related configuration unless environment is development.
1 parent f98c205 commit b07cf96

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

config.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ class Config:
2424
COMPRESSOR_DEBUG = False
2525

2626
# Flask-Assets
27-
LESS_BIN = system("which lessc")
28-
ASSETS_DEBUG = False
29-
LESS_RUN_IN_DEBUG = False
30-
if ENVIRONMENT == "development" and LESS_BIN is None:
31-
raise ValueError("Application running in `development` mode cannot create assets without `lessc` installed.")
27+
if ENVIRONMENT == "development":
28+
LESS_BIN = system("which lessc")
29+
ASSETS_DEBUG = False
30+
LESS_RUN_IN_DEBUG = False
31+
if LESS_BIN is None:
32+
raise ValueError(
33+
"Application running in `development` mode cannot create assets without `lessc` installed."
34+
)
3235

3336
# Hardcoded data
3437
PRODUCT_DATA_FILEPATH = f"{BASE_DIR}/data/products.json"

0 commit comments

Comments
 (0)