~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/debug.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-08-17 05:34:42 UTC
  • mfrom: (6059.4.8 migrate-config-options)
  • Revision ID: pqm@pqm.ubuntu.com-20110817053442-pz1w7iw2w0w78ewy
(vila) More options migrated to the stack-based config. (Vincent Ladeuil)

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.config import GlobalConfig
 
34
    from bzrlib import config
35
35
 
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)
 
36
    c = config.GlobalStack()
 
37
    for f in c.get('debug_flags'):
 
38
        debug_flags.add(f)