server/__init__.py
changeset 10612 84468b90e9c1
parent 10589 7c23b7de2b8d
child 10679 76bb963c7e8e
equal deleted inserted replaced
10611:f4dec0cca9a1 10612:84468b90e9c1
    26 
    26 
    27 import sys
    27 import sys
    28 from os.path import join, exists
    28 from os.path import join, exists
    29 from glob import glob
    29 from glob import glob
    30 from contextlib import contextmanager
    30 from contextlib import contextmanager
       
    31 
       
    32 from six import string_types
    31 
    33 
    32 from logilab.common.modutils import LazyObject
    34 from logilab.common.modutils import LazyObject
    33 from logilab.common.textutils import splitstrip
    35 from logilab.common.textutils import splitstrip
    34 from logilab.common.registry import yes
    36 from logilab.common.registry import yes
    35 from logilab import database
    37 from logilab import database
   137     """change the repository debugging mode"""
   139     """change the repository debugging mode"""
   138     global DEBUG
   140     global DEBUG
   139     if not debugmode:
   141     if not debugmode:
   140         DEBUG = 0
   142         DEBUG = 0
   141         return
   143         return
   142     if isinstance(debugmode, basestring):
   144     if isinstance(debugmode, string_types):
   143         for mode in splitstrip(debugmode, sep='|'):
   145         for mode in splitstrip(debugmode, sep='|'):
   144             DEBUG |= globals()[mode]
   146             DEBUG |= globals()[mode]
   145     else:
   147     else:
   146         DEBUG |= debugmode
   148         DEBUG |= debugmode
   147 
   149