From 300c48d8599ae7b98c3d48dcaf36f84048fecc1a Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 29 Jan 2009 15:21:45 +0100 Subject: [PATCH] [IMP] Use a real exception instead of a simple assert bzr revid: stephane@tinyerp.com-20090129142145-03gkycw9xu82y83d --- bin/tools/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/tools/config.py b/bin/tools/config.py index c3a7bacd1ac..095d6c8ae8e 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -247,7 +247,9 @@ class configmanager(object): self.options['pg_path'] = opt.pg_path if self.options.get('language', False): - assert len(self.options['language'])<=5, 'ERROR: The Lang name must take max 5 chars, Eg: -lfr_BE' + if len(self.options['language']) <= 5: + raise Exception('ERROR: The Lang name must take max 5 chars, Eg: -lfr_BE') + if opt.save: self.save()