mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
Adjust how modules are imported
* change to u. notation for util, since from foo import * is evil * make import vendor.foo possible * vendor dir is part of the repo now, no need to mkdir * use the vendor.foo notation
This commit is contained in:
parent
3c7aa32c5b
commit
1ddf4bede4
1
Makefile
1
Makefile
@ -51,7 +51,6 @@ data/users.sqlite3: data/users.sqlite3.distrib
|
||||
|
||||
dirs:
|
||||
@mkdir -p data/cherrypy_sessions
|
||||
@mkdir -p vendor
|
||||
|
||||
config: Makefile
|
||||
@test -f plinth.config || cp plinth.sample.config plinth.config
|
||||
|
||||
11
plinth.py
11
plinth.py
@ -12,14 +12,13 @@ from cherrypy.process.plugins import Daemonizer
|
||||
Daemonizer(cherrypy.engine).subscribe()
|
||||
|
||||
import plugin_mount
|
||||
from util import *
|
||||
import util as u
|
||||
|
||||
from logger import Logger
|
||||
#from modules.auth import AuthController, require, member_of, name_is
|
||||
|
||||
import withsqlite
|
||||
from withsqlite.withsqlite import sqlite_db
|
||||
import exmachina
|
||||
from exmachina.exmachina import ExMachinaClient
|
||||
from vendor.withsqlite.withsqlite import sqlite_db
|
||||
from vendor.exmachina.exmachina import ExMachinaClient
|
||||
import socket
|
||||
|
||||
__version__ = "0.2.14"
|
||||
@ -31,7 +30,7 @@ __email__ = "james@jamesvasile.com"
|
||||
__status__ = "Development"
|
||||
|
||||
def error_page(status, dynamic_msg, stock_msg):
|
||||
return page_template(template="err", title=status, main="<p>%s</p>%s" % (dynamic_msg, stock_msg))
|
||||
return u.page_template(template="err", title=status, main="<p>%s</p>%s" % (dynamic_msg, stock_msg))
|
||||
|
||||
def error_page_404(status, message, traceback, version):
|
||||
return error_page(status, message, """<p>If you believe this
|
||||
|
||||
0
vendor/__init__.py
vendored
Normal file
0
vendor/__init__.py
vendored
Normal file
Loading…
x
Reference in New Issue
Block a user