未验证 提交 8422de05 编写于 作者: A Ansgar

parse_file_list: do not try to reference non-existing `self.filename` variable

This was found by mypy.
上级 3da62c5b
......@@ -240,7 +240,7 @@ def parse_file_list(
if 'sha256sum' not in entry:
raise InvalidChangesException('No sha256sum for {0}.'.format(filename))
if safe_file_regexp is not None and not safe_file_regexp.match(filename):
raise InvalidChangesException("{0}: References file with unsafe filename {1}.".format(self.filename, filename))
raise InvalidChangesException(f"References file with unsafe filename '{filename}'.")
files[filename] = HashedFile(**entry)
return files
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册