diff --git a/pytest_html/plugin.py b/pytest_html/plugin.py index 5b2de9d8..02b14378 100644 --- a/pytest_html/plugin.py +++ b/pytest_html/plugin.py @@ -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 '