Skip to content

Commit

Permalink
Merge pull request #38 from fact-project/fix_rain
Browse files Browse the repository at this point in the history
Set default to empty string for rain
  • Loading branch information
maxnoe authored Jun 8, 2018
2 parents 64c7a24 + 7dd562a commit 817b901
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='smart_fact_crawler',
version='0.6.0',
version='0.6.1',
description='acquire data published on the smartfact web page',
url='https://github.com/fact-project/smart_fact_crawler.git',
author='Dominik Neise, Sebastian Mueller, Maximilian Nöthe',
Expand Down
3 changes: 2 additions & 1 deletion smart_fact_crawler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ def main_page(url=None, timeout=None, fallback=False):
table = smartfact2table(url, timeout=timeout)
get = partial(get_entry, fallback=fallback)

humidity = get(table, 4, 1)
humidity = get(table, 4, 1, default='')

if humidity.lower().strip() != 'rain':
humidity = s2f(humidity)

Expand Down

0 comments on commit 817b901

Please sign in to comment.