~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugin.py

  • Committer: Martin Pool
  • Date: 2010-02-10 02:03:20 UTC
  • mto: This revision was merged to the branch mainline in revision 5027.
  • Revision ID: mbp@canonical.com-20100210020320-ebyrm44ig7maa4f5
Add import tariff tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2004, 2005, 2007, 2008 Canonical Ltd
 
1
# Copyright (C) 2004, 2005, 2007, 2008, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
60
60
 
61
61
DEFAULT_PLUGIN_PATH = None
62
62
_loaded = False
 
63
_plugins_disabled = False
 
64
 
 
65
 
 
66
def are_plugins_disabled():
 
67
    return _plugins_disabled
 
68
 
63
69
 
64
70
@deprecated_function(deprecated_in((2, 0, 0)))
65
71
def get_default_plugin_path():
75
81
 
76
82
    Future calls to load_plugins() will be ignored.
77
83
    """
 
84
    global _plugins_disabled
 
85
    _plugins_disabled = True
78
86
    load_plugins([])
79
87
 
80
88