do not try pexpect on windows; fix time.clock error on windows

This commit is contained in:
Paul Gauthier 2024-08-28 22:26:48 -07:00
parent bcb3fa1b47
commit ce397b71e8
4 changed files with 5 additions and 23 deletions

View file

@ -14,7 +14,6 @@ from diskcache import Cache
from grep_ast import TreeContext, filename_to_lang
from pygments.lexers import guess_lexer_for_filename
from pygments.token import Token
from pygments.util import ClassNotFound
from tqdm import tqdm
from aider.dump import dump
@ -253,7 +252,7 @@ class RepoMap:
try:
lexer = guess_lexer_for_filename(fname, code)
except ClassNotFound:
except Exception: # On Windows, bad ref to time.clock which is deprecated
return
tokens = list(lexer.get_tokens(code))