openbmc
openbmc copied to clipboard
Making the except block more explicit, to catch OSError.
https://github.com/facebook/openbmc/blob/6cc8067ba824df537dfd0597473d578b55e65639/tests/fbtp/unittests/FbtpUtil.py#L28-L33
Can the above snippet be changed to the following?
try:
currentPath = os.getcwd()
commonPath = currentPath.replace('fbtp/unittests', 'common')
sys.path.insert(0, commonPath)
except OSError:
pass
Can I raise a PR for this?
Hi @farziengineer , that's a great point! Please raise a PR. Thank you!
.