remove annoying warnings and unnecessary prints.

show a summary of some settings on startup when running __main__.py
This commit is contained in:
fiatjaf
2020-10-06 12:59:08 -03:00
parent c5352c0309
commit 9a16dfa960
4 changed files with 20 additions and 9 deletions
+8 -5
View File
@@ -1,11 +1,10 @@
import warnings
import click
import importlib
import re
import os
import sqlite3
from scss.compiler import compile_string # type: ignore
from .core import migrations as core_migrations
from .db import open_db, open_ext_db
from .helpers import get_valid_extensions, get_css_vendored, get_js_vendored, url_for_vendored
@@ -24,9 +23,13 @@ def handle_assets():
def transpile_scss():
with open(os.path.join(LNBITS_PATH, "static/scss/base.scss")) as scss:
with open(os.path.join(LNBITS_PATH, "static/css/base.css"), "w") as css:
css.write(compile_string(scss.read()))
with warnings.catch_warnings():
warnings.simplefilter("ignore")
from scss.compiler import compile_string # type: ignore
with open(os.path.join(LNBITS_PATH, "static/scss/base.scss")) as scss:
with open(os.path.join(LNBITS_PATH, "static/css/base.css"), "w") as css:
css.write(compile_string(scss.read()))
def bundle_vendored():