equal
deleted
inserted
replaced
12 |
12 |
13 import sys |
13 import sys |
14 from os.path import join, exists |
14 from os.path import join, exists |
15 |
15 |
16 from logilab.common.modutils import LazyObject |
16 from logilab.common.modutils import LazyObject |
17 from logilab.common.textutils import get_csv |
17 from logilab.common.textutils import splitstrip |
18 |
18 |
19 # server-side debugging ######################################################### |
19 # server-side debugging ######################################################### |
20 |
20 |
21 # server debugging flags. They may be combined using binary operators. |
21 # server debugging flags. They may be combined using binary operators. |
22 DBG_NONE = 0 # no debug information |
22 DBG_NONE = 0 # no debug information |
33 global DEBUG |
33 global DEBUG |
34 if not debugmode: |
34 if not debugmode: |
35 DEBUG = 0 |
35 DEBUG = 0 |
36 return |
36 return |
37 if isinstance(debugmode, basestring): |
37 if isinstance(debugmode, basestring): |
38 for mode in get_csv(debugmode, sep='|'): |
38 for mode in splitstrip(debugmode, sep='|'): |
39 DEBUG |= globals()[mode] |
39 DEBUG |= globals()[mode] |
40 else: |
40 else: |
41 DEBUG |= debugmode |
41 DEBUG |= debugmode |
42 |
42 |
43 |
43 |