def _update_plugin(package_name):
try:<EOL><INDENT>update_json_log = plugin_install(package_name)<EOL><DEDENT>except RuntimeError as exception:<EOL><INDENT>if '<STR_LIT>' in str(exception):<EOL><INDENT>raise IOError('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>if update_json_log.get('<STR_LIT:success>'):<EOL><INDENT>if '<STR_LIT>' in update_json_log:<EOL><INDENT>actions = update_json_log['<STR_LIT>']<EOL>update_json_log['<STR_LIT>'] = actions.get('<STR_LIT>', [])<EOL>update_json_log['<STR_LIT>'] = actions.get('<STR_LIT>', [])<EOL><DEDENT>else:<EOL><INDENT>version_dict = ch.package_version(package_name)<EOL>update_json_log.update(version_dict)<EOL><DEDENT>return update_json_log<EOL><DEDENT>
Update plugin (no user interface).

.. versionadded:: 0.19

Parameters
----------
package_name : str, optional
    Conda MicroDrop plugin package name, e.g., `microdrop.mr-box-plugin`.

Returns
-------
dict
    If plugin was updated successfully, output will *at least* contain
    items with the keys ``old_versions`` and ``new_versions``.

    If no update was available, output will *at least* contain an item with
    the key ``version`` and will **not** contain the keys ``old_versions``
    and ``new_versions``.

Raises
------
IOError
    If Conda update server cannot be reached, e.g., if there is no network
    connection available.

See also
--------
_update_plugin_ui