Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ef2431e

Browse files
Utilize subprocess module to determine lessc location.
1 parent f673978 commit ef2431e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎config.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
"""App configuration."""
2-
from os import environ, path, system
2+
from os import environ, path
3+
import subprocess
34

45
import redis
56
from dotenv import load_dotenv
67

8+
# Read environment variables from ".env" file.
79
BASE_DIR = path.abspath(path.dirname(__file__))
810
load_dotenv(path.join(BASE_DIR, ".env"))
911

@@ -30,7 +32,7 @@ class Config:
3032
SQLALCHEMY_ECHO = False
3133

3234
# Flask-Assets (Optional)
33-
LESS_BIN = system("which lessc")
35+
LESS_BIN = subprocess.run("which lessc", shell=True, check=True)
3436
ASSETS_DEBUG = False
3537
LESS_RUN_IN_DEBUG = False
3638
STATIC_FOLDER = "static"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /