~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/debug.py

  • Committer: Gordon Tyler
  • Date: 2011-06-30 21:00:38 UTC
  • mto: This revision was merged to the branch mainline in revision 6007.
  • Revision ID: gordon@doxxx.net-20110630210038-bzscps46jgcqtkr0
Use known executables for win32 and other platforms in test_exe_on_path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
def set_debug_flags_from_config():
32
32
    """Turn on debug flags based on the global configuration"""
33
33
 
34
 
    from bzrlib import config
 
34
    from bzrlib.config import GlobalConfig
35
35
 
36
 
    c = config.GlobalStack()
37
 
    for f in c.get('debug_flags'):
38
 
        debug_flags.add(f)
 
36
    c = GlobalConfig()
 
37
    value = c.get_user_option("debug_flags")
 
38
    if value is not None:
 
39
        # configobject gives us either a string if there's just one or a list
 
40
        # if there's multiple
 
41
        if isinstance(value, basestring):
 
42
            value = [value]
 
43
        for w in value:
 
44
            w = w.strip()
 
45
            debug_flags.add(w)