Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 82a3698

Browse files
committed
Fix small bug where module names were being incorrectly lowercased in
backend specifications. Thanks to Evan Patterson and Brian Granger for spotting the problem and fix. svn path=/trunk/matplotlib/; revision=8657
1 parent 77ef85b commit 82a3698

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,10 +880,11 @@ def use(arg, warn=True):
880880
if 'matplotlib.backends' in sys.modules:
881881
if warn: warnings.warn(_use_error_msg)
882882
return
883-
arg = arg.lower()
884883
if arg.startswith('module://'):
885884
name = arg
886885
else:
886+
# Lowercase only non-module backend names (modules are case-sensitive)
887+
arg = arg.lower()
887888
be_parts = arg.split('.')
888889
name = validate_backend(be_parts[0])
889890
if len(be_parts) > 1:

0 commit comments

Comments
 (0)