From 16d7c032b4e95074e567a85b1c48f465d86a1eb4 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Wed, 7 Feb 2018 15:59:55 +0000 Subject: [PATCH] Change add handling for where requesting disk freespace is denied permission on some Linux distros. --- CHANGES.md | 7 ++++++- sickbeard/helpers.py | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ace50c35..0c36493b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 0.14.1 (2018-02-03 22:40:00 UTC) +### 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 Change restrict changing custom download qualities to reasonable selections 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