Commit 6d25e6e5 authored by Niklas Selke's avatar Niklas Selke
Browse files

If the 'seasons' argument is required but None no 'ValueError' will be raised.

parent 141ca8fc
......@@ -250,14 +250,14 @@ def check_seasons(seasons_in, seasons_req):
required
:raises ValueError: raised if the seasons argument is required and
either missing or is not a type of list or a
string or if no season is given or if any given
season is not recognized
not None and either not a type of list or a
string or empty or any given season is not
recognized
:return: A list of seasons or None if the seasons argument is not
needed
:return: A list of seasons or None if the seasons argument is either
not needed or None
"""
if not seasons_req:
if not seasons_req or seasons_in is None:
return None
if not isinstance(seasons_in, (list, set, tuple, str)):
raise ValueError("The seasons argument must be a list, set, tuple or"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment