~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugin.py

  • Committer: Martin Pool
  • Date: 2010-02-25 06:17:27 UTC
  • mfrom: (5055 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5057.
  • Revision ID: mbp@sourcefrog.net-20100225061727-4sd9lt0qmdc6087t
merge news

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