From 1788440a5ca3bb9b9cd3162c1b8528dd007a5a80 Mon Sep 17 00:00:00 2001 From: Dean Gardiner Date: Wed, 16 Oct 2013 15:40:25 +1300 Subject: [PATCH] Cleaned up usage of helper functions Conflicts: couchpotato/core/media/show/searcher/main.py couchpotato/core/plugins/matcher/main.py --- couchpotato/core/helpers/variable.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/couchpotato/core/helpers/variable.py b/couchpotato/core/helpers/variable.py index 8c623f63..7d35b997 100644 --- a/couchpotato/core/helpers/variable.py +++ b/couchpotato/core/helpers/variable.py @@ -213,3 +213,6 @@ def randomString(size = 8, chars = string.ascii_uppercase + string.digits): def splitString(str, split_on = ',', clean = True): list = [x.strip() for x in str.split(split_on)] if str else [] return filter(None, list) if clean else list + +def dictIsSubset(a, b): + return all([k in b and b[k] == v for k, v in a.items()])