Skip to content

Commit

Permalink
Convert 'is None' checks to 'not' checks
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed Jan 13, 2019
1 parent add0168 commit 26b88ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion yvs/copy_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def get_chapter_html(ref):

entry_key = '{}.html'.format(chapter_uid)
chapter_html = shared.get_cache_entry_content(entry_key)
if chapter_html is None:
if not chapter_html:
chapter_html = shared.get_url_content(url)
shared.add_cache_entry(entry_key, chapter_html)

Expand Down
2 changes: 1 addition & 1 deletion yvs/search_refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_search_html(query_str):

entry_key = '{}/{}.html'.format(version, query_str)
search_html = shared.get_cache_entry_content(entry_key)
if search_html is None:
if not search_html:
search_html = shared.get_url_content(url)
shared.add_cache_entry(entry_key, search_html)

Expand Down

0 comments on commit 26b88ab

Please sign in to comment.