Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if not to_date:
# Set to default value of today
to_date = date.today().strftime(DATE_FORMAT)
if not from_date:
# Set to default value of one week ago
from_date = (date.today() -
timedelta(days=7)).strftime(DATE_FORMAT)
if not wsdl.upper().endswith('?WSDL'):
wsdl += '?WSDL'
from ulmo.cuahsi import wof
try:
return wof.get_values(wsdl, site, variable, from_date, to_date, None,
timeout=settings.BIGCZ_CLIENT_TIMEOUT)
except timeout:
raise ValuesTimedOutError()