From 3028b7d8cae624d54ac5a217e9641631a47005e7 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Thu, 14 May 2015 22:12:42 -0400 Subject: [PATCH] You can now override hardcoded keys by adding attributes to the application module. --- src/keys/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/keys/__init__.py b/src/keys/__init__.py index 52b35647..72d10b16 100644 --- a/src/keys/__init__.py +++ b/src/keys/__init__.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +import application import platform import exceptions from ctypes import c_char_p @@ -28,4 +29,6 @@ class Keyring(object): return result.value def get(self, func): + if hasattr(application,func+"_override"): + return getattr(application,func+'_override') return getattr(self, "_call_method")("get_"+func)