diff --git a/CHANGES.md b/CHANGES.md index 443603c9..99a2c827 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -99,6 +99,11 @@ * Change removed NZBGet 'remote' PostProcess guidance until it is verified to work +### 0.14.2 (2018-02-07 16:00:00 UTC) + +Change add handling for where requesting disk freespace is denied permission on some Linux distros + + ### 0.14.1 (2018-02-03 22:40:00 UTC) Change terminology around the custom quality selection to improve clarity diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py index bb5a6b72..afcbcb8c 100644 --- a/sickbeard/helpers.py +++ b/sickbeard/helpers.py @@ -1611,7 +1611,10 @@ def freespace(path=None): except(StandardError, Exception): pass elif sys.platform.startswith(('linux', 'darwin', 'sunos5')) or 'bsd' in sys.platform: - storage = os.statvfs(path) - result = storage.f_bavail * storage.f_frsize + try: + storage = os.statvfs(path) # perms errors can result + result = storage.f_bavail * storage.f_frsize + except OSError: + pass return result