[IMP] Use a real exception instead of a simple assert
bzr revid: stephane@tinyerp.com-20090129142145-03gkycw9xu82y83d
This commit is contained in:
+3
-1
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user