Adrian Sampson committed 7a2b3bb Merge

Merge pull request #84 from dangmai/better_cli_exit

Add lib parameter for cli_exit

Comments (0)

Files changed (2)


     # 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
-        plugins.send('cli_exit')
     except UserError as exc:
         message = exc.args[0] if exc.args else None
         log.error(u'error: {0}'.format(message))


 * *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.