Commits

Adrian Sampson committed 7a2b3bb Merge

Merge pull request #84 from dangmai/better_cli_exit

Add lib parameter for cli_exit

  • Participants
  • Parent commits 69b0bf1, 1ac952f

Comments (0)

Files changed (2)

File beets/ui/__init__.py

 
     # Invoke the subcommand.
     subcommand.func(lib, suboptions, subargs)
+    plugins.send('cli_exit', lib=lib)
 
 def main(args=None):
     """Run the main command-line interface for beets. Includes top-level
     """
     try:
         _raw_main(args)
-        plugins.send('cli_exit')
     except UserError as exc:
         message = exc.args[0] if exc.args else None
         log.error(u'error: {0}'.format(message))

File docs/plugins/writing.rst

 * *database_change*: a modification has been made to the library database. The
   change might not be committed yet. Parameter: ``lib``.
 
-* *cli_exit*: called just before the ``beet`` command-line program exits. No
-  parameters.
+* *cli_exit*: called just before the ``beet`` command-line program exits. Parameter: ``lib``.
 
 The included ``mpdupdate`` plugin provides an example use case for event listeners.