Skip to content

Commit

Permalink
Add zopectl.command commands
Browse files Browse the repository at this point in the history
Fixes #18
  • Loading branch information
gforcada committed Dec 14, 2015
1 parent d7ce4a1 commit df9ae5b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/plone/recipe/zope2instance/ctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,15 @@ def main(args=None):
if func_name not in dir(c):
setattr(c.__class__, func_name, func)

# Mix in any additional commands supplied by other packages
# registered for zopectl:
for ep in iter_entry_points('zopectl.command'):
func_name = 'do_' + ep.name
func = ep.load()
# avoid overwriting the standard commands
if func_name not in dir(c):
setattr(c.__class__, func_name, func)

# If a command was specified: call the corresponding do_*() method.
#
# If that method set an exit status, exit this Python script
Expand Down

0 comments on commit df9ae5b

Please sign in to comment.