Skip to content

Commit

Permalink
Match DayLocator.interval check and message order
Browse files Browse the repository at this point in the history
  • Loading branch information
LindyBalboa committed Aug 19, 2016
1 parent e577564 commit 940090c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/matplotlib/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -1241,9 +1241,8 @@ def __init__(self, bymonthday=None, interval=1, tz=None):
Default is to tick every day of the month: ``bymonthday=range(1,32)``
"""
if interval < 1 or not isinstance(interval, int):
raise ValueError("The interval parameter must be an integer "
"greater than or equal to one.")
if not isinstance(interval, int) or interval < 1:
raise ValueError("interval must be an integer greater than 0")
if bymonthday is None:
bymonthday = range(1, 32)
elif isinstance(bymonthday, np.ndarray):
Expand Down

0 comments on commit 940090c

Please sign in to comment.