/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/commands.py

  • Committer: Breezy landing bot
  • Author(s): Martin
  • Date: 2017-06-05 01:55:02 UTC
  • mfrom: (6651.4.3 plugin_rewrite)
  • Revision ID: breezy.the.bot@gmail.com-20170605015502-tqiyvpz3qt00fge1
Rewrite of plugin module

Merged from https://code.launchpad.net/~gz/brz/plugin_rewrite/+merge/325033

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
from .i18n import gettext
51
51
# Compatibility - Option used to be in commands.
52
52
from .option import Option
53
 
from .plugin import disable_plugins, load_plugins
 
53
from .plugin import disable_plugins, load_plugins, plugin_name
54
54
from . import registry
55
55
from .sixish import (
56
56
    string_types,
755
755
 
756
756
        :return: The name of the plugin or None if the command is builtin.
757
757
        """
758
 
        mod_parts = self.__module__.split('.')
759
 
        if len(mod_parts) >= 3 and mod_parts[1] == 'plugins':
760
 
            return mod_parts[2]
761
 
        else:
762
 
            return None
 
758
        return plugin_name(self.__module__)
763
759
 
764
760
 
765
761
class CommandHooks(Hooks):