mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
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.'
|
||||
|
||||
class LicenseKey(registry.String):
|
||||
def set(self, s):
|
||||
original = getattr(self, 'value', self.default)
|
||||
registry.String.set(self, s)
|
||||
if self.value and len(self.value) != 32:
|
||||
setattr(self, 'value', original)
|
||||
google.setLicense(self.value)
|
||||
def setValue(self, s):
|
||||
if s and len(s) != 32:
|
||||
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)
|
||||
|
||||
conf.registerPlugin('Google')
|
||||
|
Loading…
Reference in New Issue
Block a user