Skip to content

Commit

Permalink
Improve content state variable name (pytest-dev#124).
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkie1378 committed Jan 3, 2018
1 parent 3057778 commit 7a72672
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pytest_html/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ def append_extra_html(self, extra, extra_index, test_index):
if extra.get('format') == extras.FORMAT_IMAGE:
content = extra.get('content')
try:
is_file = (content.startswith(('file', 'http')) or
isfile(content))
is_uri_or_path = (content.startswith(('file', 'http')) or
isfile(content))
except ValueError:
# On Windows, os.path.isfile throws this exception when
# passed a b64 encoded image.
is_file = False
if is_file:
is_uri_or_path = False
if is_uri_or_path:
if self.self_contained:
warnings.warn('Self-contained HTML report '
'includes link to external '
Expand Down

0 comments on commit 7a72672

Please sign in to comment.