--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/candolint/utils.py Sun Jul 17 05:10:35 2016 +0800
+from __future__ import absolute_import
+from os.path import abspath, dirname, join
+ return abspath(join(dirname(dirname(__file__)), *parts))
--- a/checker.py Sun Jul 17 01:15:16 2016 +0800
+++ b/checker.py Sun Jul 17 05:10:35 2016 +0800
-rel = lambda *x: os.path.abspath(os.path.join(os.path.dirname(__file__), *x))
+from candolint.utils import rel
def run_ignore_codes(fn, args, codes):
--- a/incoming.py Sun Jul 17 01:15:16 2016 +0800
+++ b/incoming.py Sun Jul 17 05:10:35 2016 +0800
from __future__ import absolute_import
from argparse import ArgumentParser, FileType
from tornado.escape import json_encode
from candolint.models import database, Project, Change, Check
-rel = lambda *x: os.path.abspath(os.path.join(os.path.dirname(__file__), *x))
+from candolint.utils import rel
def parse_timestamp(value):
--- a/viewer.py Sun Jul 17 01:15:16 2016 +0800
+++ b/viewer.py Sun Jul 17 05:10:35 2016 +0800
from __future__ import absolute_import
from tornado.ioloop import IOLoop
from tornado.options import define, options
from candolint import uimodules
from candolint.handlers import IndexHandler, ProjectHandler, CheckHandler, StatusHandler, ErrorHandler
from candolint.models import database
-rel = lambda *x: os.path.abspath(os.path.join(os.path.dirname(__file__), *x))
+from candolint.utils import rel
define('listen', metavar='IP', default='127.0.0.1')