mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 18:54:59 +00:00
Armor AutoCompleter against unicode errors #305
This commit is contained in:
parent
efb3f03a62
commit
f3d3815201
3 changed files with 42 additions and 1 deletions
|
@ -44,7 +44,7 @@ class AutoCompleter(Completer):
|
|||
try:
|
||||
with open(fname, "r", encoding=self.encoding) as f:
|
||||
content = f.read()
|
||||
except FileNotFoundError:
|
||||
except (FileNotFoundError, UnicodeDecodeError):
|
||||
continue
|
||||
try:
|
||||
lexer = guess_lexer_for_filename(fname, content)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue