[IMP] Use a real exception instead of a simple assert

bzr revid: stephane@tinyerp.com-20090129142145-03gkycw9xu82y83d
This commit is contained in:
Stephane Wirtel
2009-01-29 15:21:45 +01:00
parent 90dea28166
commit 300c48d859
+3 -1
View File
@@ -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()