goa/bin/laxctl
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 18 Jan 2010 19:05:08 +0100
changeset 4251 3c6569be1f86
parent 0 b97547f5f1fa
permissions -rwxr-xr-x
fix pb with bytes field processing: currently when an existing file is edited and no new file is specified, it finds no value in req.form and so try to detach the current file, which is wrong. In that case, nothing should be done. So introduce a new UnmodifiedField exception that may be raised in field's process_form_value method (catched in field.process_posted).

#!/usr/bin/env python

import sys
import os.path as osp

APPLROOT = osp.abspath(osp.join(osp.dirname(osp.abspath(__file__)), '..'))
if APPLROOT not in sys.path:
    sys.path.insert(0, APPLROOT)
CUBES_DIR = osp.join(APPLROOT, 'cw-cubes')
if CUBES_DIR not in sys.path:
    sys.path.insert(1, CUBES_DIR)
    
try:
    import custom
except ImportError, exc:
    print exc
    sys.exit(2)

from tools.laxctl import run
run()