Skip to content
Snippets Groups Projects
Commit a2961af3 authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[analysis-scripts] find-fun: better handling of broken symlinks

parent 8843aa88
No related branches found
No related tags found
No related merge requests found
...@@ -74,12 +74,15 @@ possible_declarators = [] ...@@ -74,12 +74,15 @@ possible_declarators = []
possible_definers = [] possible_definers = []
re_fun = function_finder.prepare_re_specific_name(fname) re_fun = function_finder.prepare_re_specific_name(fname)
for f in files: for f in files:
found = function_finder.find_specific_name(re_fun, f) try:
if found: found = function_finder.find_specific_name(re_fun, f)
if found == 1: if found:
possible_declarators.append(f) if found == 1:
else: possible_declarators.append(f)
possible_definers.append(f) else:
possible_definers.append(f)
except OSError as e:
print(f"error opening '{f}' ({e.errno}, {e.strerror}), skipping file")
def relative_path_to(start): def relative_path_to(start):
return lambda p: os.path.relpath(p, start=start) return lambda p: os.path.relpath(p, start=start)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment