From fd57203a67d74809d588e08756d366b268fb1e05 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 3 Sep 2003 09:45:11 +0000 Subject: [PATCH] Changed a something to an anything and looped until a valid key is given in configure. --- plugins/Google.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/plugins/Google.py b/plugins/Google.py index 5b24ab8f0..ec4fd3fc8 100644 --- a/plugins/Google.py +++ b/plugins/Google.py @@ -53,9 +53,17 @@ def configure(onStart, afterConnect, advanced): from questions import expect, anything, something, yn print 'To use Google\'t Web Services, you must have a license key.' if yn('Do you have a license key?') == 'y': - key = anything('What is it?') - onStart.append('load Google') - onStart.append('googlelicensekey %s' % key) + key = something('What is it?') + while len(key) != 32: + print 'That\'s not a valid Google license key.' + if yn('Are you sure you have a valid Google license key?') == 'y': + key = something('What is it?') + else: + key = '' + break + if key: + onStart.append('load Google') + onStart.append('googlelicensekey %s' % key) if yn('Google depends on the Alias module for some commands. ' \ 'Is the Alias module loaded?') == 'n': if yn('Would you like to load the Alias module now?') == 'y':