ignore exceptions in get_file_contents

it should be common enough to not be able to read files in some jailed/container environments
even though permissions tell us otherwise
pull/14009/head
Brian Coca 9 years ago
parent 5e18bc5955
commit 5dd2aad535

@ -2987,6 +2987,9 @@ def get_file_content(path, default=None, strip=True):
data = data.strip()
if len(data) == 0:
data = default
except:
# todo: issue warning about unreadable file?
pass
finally:
datafile.close()
return data

Loading…
Cancel
Save