From 339c0146748161806e0cbdf5a0766f5039296bf0 Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 16 Apr 2012 00:06:43 +0200 Subject: [PATCH] Environment property function --- couchpotato/environment.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/couchpotato/environment.py b/couchpotato/environment.py index ac256c18..ec2fbbf1 100644 --- a/couchpotato/environment.py +++ b/couchpotato/environment.py @@ -61,6 +61,14 @@ class Env(object): return s + @staticmethod + def prop(identifier, value = None): + s = Env.get('settings') + if value == None: + return s.getProperty(identifier) + + s.setProperty(identifier, value) + @staticmethod def getPermission(setting_type): perm = Env.get('settings').get('permission_%s' % setting_type, default = '0777')