mirror of
https://github.com/laurivosandi/certidude
synced 2024-12-23 00:25:18 +00:00
api: __init__: Drop unused imports and fix broken import
This commit is contained in:
parent
d476998c9e
commit
f6c0e1ae85
@ -4,13 +4,10 @@ import falcon
|
|||||||
import mimetypes
|
import mimetypes
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import click
|
|
||||||
import hashlib
|
import hashlib
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime
|
||||||
from time import sleep
|
|
||||||
from xattr import listxattr, getxattr
|
from xattr import listxattr, getxattr
|
||||||
from certidude import mailer
|
from certidude.auth import login_required
|
||||||
from certidude.auth import login_required, authorize_admin
|
|
||||||
from certidude.user import User
|
from certidude.user import User
|
||||||
from certidude.decorators import serialize, csrf_protection
|
from certidude.decorators import serialize, csrf_protection
|
||||||
from certidude import const, config
|
from certidude import const, config
|
||||||
@ -274,7 +271,7 @@ def certidude_app(log_handlers=[]):
|
|||||||
app.add_route("/api/log/", LogResource(uri))
|
app.add_route("/api/log/", LogResource(uri))
|
||||||
elif config.LOGGING_BACKEND == "syslog":
|
elif config.LOGGING_BACKEND == "syslog":
|
||||||
from logging.handlers import SyslogHandler
|
from logging.handlers import SyslogHandler
|
||||||
log_handlers.append(SysLogHandler())
|
log_handlers.append(SyslogHandler())
|
||||||
# Browsing syslog via HTTP is obviously not possible out of the box
|
# Browsing syslog via HTTP is obviously not possible out of the box
|
||||||
elif config.LOGGING_BACKEND:
|
elif config.LOGGING_BACKEND:
|
||||||
raise ValueError("Invalid logging.backend = %s" % config.LOGGING_BACKEND)
|
raise ValueError("Invalid logging.backend = %s" % config.LOGGING_BACKEND)
|
||||||
|
Loading…
Reference in New Issue
Block a user