File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,8 +214,14 @@ class Verbose:
214214 _commandLineVerbose = None
215215
216216 for arg in sys .argv [1 :]:
217- if not arg .startswith ('--verbose-' ): continue
218- _commandLineVerbose = arg [10 :]
217+ if not arg .startswith ('--verbose-' ):
218+ continue
219+ level_str = arg [10 :]
220+ # If it doesn't match one of ours, then don't even
221+ # bother noting it, we are just a 3rd-party library
222+ # to somebody else's script.
223+ if level_str in levels :
224+ _commandLineVerbose = level_str
219225
220226 def __init__ (self ):
221227 self .set_level ('silent' )
@@ -227,8 +233,10 @@ def set_level(self, level):
227233 if self ._commandLineVerbose is not None :
228234 level = self ._commandLineVerbose
229235 if level not in self .levels :
230- raise ValueError ('Illegal verbose string "%s". Legal values are %s' % (level , self .levels ))
231- self .level = level
236+ warnings .warn ('matplotlib: unrecognized --verbose-* string "%s".'
237+ ' Legal values are %s' % (level , self .levels ))
238+ else :
239+ self .level = level
232240
233241 def set_fileo (self , fname ):
234242 std = {
You can’t perform that action at this time.
0 commit comments