You can now override hardcoded keys by adding attributes to the application module.

This commit is contained in:
Bill Dengler 2015-05-14 22:12:42 -04:00
parent 4a025caa69
commit 3028b7d8ca

View File

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import application
import platform import platform
import exceptions import exceptions
from ctypes import c_char_p from ctypes import c_char_p
@ -28,4 +29,6 @@ class Keyring(object):
return result.value return result.value
def get(self, func): def get(self, func):
if hasattr(application,func+"_override"):
return getattr(application,func+'_override')
return getattr(self, "_call_method")("get_"+func) return getattr(self, "_call_method")("get_"+func)