~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugin.py

  • Committer: Robert Collins
  • Date: 2005-10-30 01:40:16 UTC
  • Revision ID: robertc@robertcollins.net-20051030014016-98a4fba7d6a4176c
Support decoration of commands.

Commands.register_command now takes an optional flag to signal that the
registrant is planning to decorate an existing command. When given
multiple plugins registering a command is not an error, and the original
command class (whether built in or a plugin based one) is returned to the
caller. There is a new error 'MustUseDecorated' for signalling when a
wrapping command should switch to the original version. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
                        plugin_info[0].close()
138
138
 
139
139
                mutter('loaded succesfully')
140
 
            except:
141
 
                ## import pdb
142
 
                ## pdb.set_trace()
 
140
            except KeyboardInterrupt:
 
141
                raise
 
142
            except Exception, e:
 
143
                ## import pdb; pdb.set_trace()
143
144
                warning('Unable to load plugin %r from %r' % (name, d))
144
145
                log_exception_quietly()