mirror of https://github.com/Mikaela/Limnoria.git
I guess I should've used setValue instead of set for LicenseKey
This commit is contained in:
parent
6f24ebecce
commit
af442c8313
|
@ -124,14 +124,14 @@ def search(log, queries, **kwargs):
|
||||||
'The full traceback has been logged.'
|
'The full traceback has been logged.'
|
||||||
|
|
||||||
class LicenseKey(registry.String):
|
class LicenseKey(registry.String):
|
||||||
def set(self, s):
|
def setValue(self, s):
|
||||||
original = getattr(self, 'value', self.default)
|
if s and len(s) != 32:
|
||||||
registry.String.set(self, s)
|
|
||||||
if self.value and len(self.value) != 32:
|
|
||||||
setattr(self, 'value', original)
|
|
||||||
google.setLicense(self.value)
|
|
||||||
raise registry.InvalidRegistryValue, 'Invalid Google license key.'
|
raise registry.InvalidRegistryValue, 'Invalid Google license key.'
|
||||||
if self.value:
|
if s:
|
||||||
|
registry.String.setValue(self, s)
|
||||||
|
google.setLicense(self.value)
|
||||||
|
if not s:
|
||||||
|
registry.String.setValue(self, '')
|
||||||
google.setLicense(self.value)
|
google.setLicense(self.value)
|
||||||
|
|
||||||
conf.registerPlugin('Google')
|
conf.registerPlugin('Google')
|
||||||
|
|
Loading…
Reference in New Issue