)]}'
{"subunit2sql/analysis/graph.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"2993b799316d394c20dbf8678ccf19d08a793878","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        graph_commands[command] \u003d getattr(subunit2sql.analysis, command)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    for plugin in get_plugin_list():"},{"line_number":60,"context_line":"        graph_commands[plugin.name] \u003d plugin.entry_point"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    for name in graph_commands:"},{"line_number":63,"context_line":"        parser \u003d subparsers.add_parser(name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_44c4633f","line":60,"updated":"2015-06-01 19:59:14.000000000","message":"The entry_point is literally a pkg_resources.EntryPoint object. You either want to use invoke_on_load\u003dTrue to get an instance of a class as the plugin is loaded (accessed from plugin.obj) or if you are using functions in a module I think you can just use plugin.plugin to get them (plugin.plugin is the object returned when EntryPoint.load() is called).\n\nInstead of building your own dictionary mapping names to plugins, you could also use __getitem__ on the manager directly. For example:\n\n  mgr \u003d get_plugin_list()\n  for name in graph_commands:\n    parser \u003d subparsers.add_parser(name)\n    mgr[name].obj.set_cli_opts(parser)\n    ...","commit_id":"bd5241e651f3d62900a29e68e4deb3288fb339e4"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"fc3cbe83296effdc26c081a0a8be2a892aa6601f","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        graph_commands[command] \u003d getattr(subunit2sql.analysis, command)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    for plugin in get_plugin_list():"},{"line_number":60,"context_line":"        graph_commands[plugin.name] \u003d plugin.entry_point"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    for name in graph_commands:"},{"line_number":63,"context_line":"        parser \u003d subparsers.add_parser(name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_89125db3","line":60,"in_reply_to":"5afe65bd_44c4633f","updated":"2015-06-02 10:30:34.000000000","message":"Done\n\nI think I\u0027ll stick with constructing the dict still though because I like that it uses the same loop for the plugins and the in-tree commands.","commit_id":"bd5241e651f3d62900a29e68e4deb3288fb339e4"}]}
