mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +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:
|
dirs:
|
||||||
@mkdir -p data/cherrypy_sessions
|
@mkdir -p data/cherrypy_sessions
|
||||||
@mkdir -p vendor
|
|
||||||
|
|
||||||
config: Makefile
|
config: Makefile
|
||||||
@test -f plinth.config || cp plinth.sample.config plinth.config
|
@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()
|
Daemonizer(cherrypy.engine).subscribe()
|
||||||
|
|
||||||
import plugin_mount
|
import plugin_mount
|
||||||
from util import *
|
import util as u
|
||||||
|
|
||||||
from logger import Logger
|
from logger import Logger
|
||||||
#from modules.auth import AuthController, require, member_of, name_is
|
#from modules.auth import AuthController, require, member_of, name_is
|
||||||
|
|
||||||
import withsqlite
|
from vendor.withsqlite.withsqlite import sqlite_db
|
||||||
from withsqlite.withsqlite import sqlite_db
|
from vendor.exmachina.exmachina import ExMachinaClient
|
||||||
import exmachina
|
|
||||||
from exmachina.exmachina import ExMachinaClient
|
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
__version__ = "0.2.14"
|
__version__ = "0.2.14"
|
||||||
@ -31,7 +30,7 @@ __email__ = "james@jamesvasile.com"
|
|||||||
__status__ = "Development"
|
__status__ = "Development"
|
||||||
|
|
||||||
def error_page(status, dynamic_msg, stock_msg):
|
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):
|
def error_page_404(status, message, traceback, version):
|
||||||
return error_page(status, message, """<p>If you believe this
|
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