Don't use len(SEQUENCE) as condition value (#7249)

* Don't use len(SEQUENCE) as condition value

* Update volvooncall.py
This commit is contained in:
Fabian Affolter 2017-04-24 05:41:09 +02:00 committed by Paulus Schoutsen
parent 15b2473224
commit cfc023e128
43 changed files with 319 additions and 355 deletions

View file

@ -48,7 +48,7 @@ def setup(hass, config):
if not os.path.isdir(download_path):
_LOGGER.error(
"Download path %s does not exist. File Downloader not active.",
"Download path %s does not exist. File Downloader not active",
download_path)
return False
@ -76,7 +76,7 @@ def setup(hass, config):
match = re.findall(r"filename=(\S+)",
req.headers['content-disposition'])
if len(match) > 0:
if match:
filename = match[0].strip("'\" ")
if not filename:
@ -84,7 +84,7 @@ def setup(hass, config):
url).strip()
if not filename:
filename = "ha_download"
filename = 'ha_download'
# Remove stuff to ruin paths
filename = sanitize_filename(filename)