Skip to content
Snippets Groups Projects
Forked from atlas / athena
Source project has a limited visibility.
user avatar
Zach Marshall authored
In some recent grid jobs, cvmfs goes stale. In those cases, the file
that this piece of code is looking for won't be found. Right now it
looks for the file, identifies that it isn't there, and prints a
warning (because the filename is None). It then tries to open the file
anyway. Looking at the code, I can't imagine that's what was intended,
because even in the case that it fails to open the code because of an
OSError it just prints a warning and continues. Therefore adding an
'else' here to avoid opening the file in case the name is None. This
could also be done by catching a TypeError exception, but I don't see
why we should use try/except logic when we have a nice clean way to test
for the condition with an if statement (and we already do).
f2bf3c8e
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name Last commit Last update
..