Commit 73e60439 authored by Mattia Rizzolo's avatar Mattia Rizzolo

Use the 'htmlmin' python module, instead of 'django-htmlmin'

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mapreri@ubuntu.com>
parent 8266ccb8
Pipeline #191 passed with stage
in 0 seconds
......@@ -39,7 +39,7 @@ setuptools.setup(
"pyyaml",
"requests",
"toml",
"django-htmlmin",
"htmlmin",
],
packages = [
......
......@@ -22,6 +22,14 @@ from htmlmin import minify as html_minify
import gunicorn.app.base as baseapp
# check that the html_minify we imported is a real function
# (i.e., no the html_minify that comes from django-htmlmin)
try:
assert callable(html_minify)
except AssertionError:
raise ImportError("html_minify is not callable")
def random_key(length):
"""Generate a random key of a given length"""
rng = random.SystemRandom() # Use /dev/urandom
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment