We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e06d6b commit 7ae14e0Copy full SHA for 7ae14e0
gccutils/__init__.py
@@ -24,7 +24,10 @@ def sorted_dict_repr(d):
24
def get_src_for_loc(loc):
25
# Given a gcc.Location, get the source line as a string
26
import linecache
27
- return linecache.getline(loc.file, loc.line).rstrip()
+ try:
28
+ return linecache.getline(loc.file, loc.line).rstrip()
29
+ except SyntaxError: # unrecognized encoding of file
30
+ return ''
31
32
def get_field_by_name(typeobj, name):
33
check_isinstance(typeobj,
0 commit comments