From 9deae1569fc8d56555a4d11bd650a5f0b5b5c325 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 5 Sep 2014 23:44:29 -0400 Subject: [PATCH] BUG : restore back-compatibility of regisiter_backend revert back-incompatible change from 8159c817bb41dc0c3d86aa909318eb3e55a64d8f closes #3439 --- lib/matplotlib/backend_bases.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index aa1b76635643..9d610dff1afc 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -98,19 +98,21 @@ def import_module(name): } -def register_backend(format, backend, description): +def register_backend(format, backend, description=None): """ Register a backend for saving to a given file format. - *format* + format : str File extention - *backend* - Backend for handling file output (module string or canvas class) + backend : module string or canvas class + Backend for handling file output - *description* - Description of the file type + description : str, optional + Description of the file type. Defaults to an empty string """ + if description is None: + description = '' _default_backends[format] = backend _default_filetypes[format] = description