mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 905510 - Handle imported file not found. r=hsinyi
This commit is contained in:
parent
ee8f12a0ab
commit
2f91fef6e9
@ -140,6 +140,9 @@ class ResourceUriFileReader:
|
||||
@classmethod
|
||||
def get_uri(cls, filename):
|
||||
"""Convert filename to URI in system."""
|
||||
if filename.startswith(cls.URI_PREFIX):
|
||||
return filename
|
||||
else:
|
||||
return cls.URI_PREFIX + cls.URI_PATH[filename]
|
||||
|
||||
def __init__(self, marionette):
|
||||
@ -278,13 +281,15 @@ class Linter:
|
||||
# Maintain a mapping table.
|
||||
# New line number after merge => original file and line number.
|
||||
info.append((dst_line, filepath, 1))
|
||||
|
||||
try:
|
||||
code = self.code_reader.read_file(filepath)
|
||||
lines = code.splitlines(True) # Keep '\n'.
|
||||
src_results = StringUtility.auto_wrap_strict_mode(
|
||||
StringUtility.auto_close(lines))
|
||||
dst_results.extend(src_results)
|
||||
dst_line += len(src_results)
|
||||
except:
|
||||
info.pop()
|
||||
return dst_results, info
|
||||
|
||||
def _convert_merged_result(self, error_lines, line_info):
|
||||
|
Loading…
Reference in New Issue
Block a user