diff options
| author | ced <> | 2007-08-31 13:47:26 +0000 |
|---|---|---|
| committer | ced <> | 2007-08-31 13:47:26 +0000 |
| commit | 654ebf2daee167ce3113df64794af86f14c8a91f (patch) | |
| tree | fbf4123be89e133f90806679aa449244478d12da /bin | |
| parent | 8e1497f35b591c304205250922c1e3e800842f0d (diff) | |
Handle also osv, orm exception in wizard execution
bzr revid: ced-95a0d98425a98d3db0b412dcb2316779c1157153
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/wizard/__init__.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/wizard/__init__.py b/bin/wizard/__init__.py index 88a2d59c461..c2343cc9eff 100644 --- a/bin/wizard/__init__.py +++ b/bin/wizard/__init__.py @@ -34,6 +34,9 @@ from xml import dom import ir import pooler +from osv.osv import except_osv +from osv.orm import except_orm + class except_wizard(Exception): def __init__(self, name, value): self.name = name @@ -137,9 +140,13 @@ class interface(netsvc.Service): res['arch'] = arch res['state'] = button_list - except except_wizard, e: - self.abortResponse(2, e.name, 'warning', e.value) - + except Exception, e: + if isinstance(e, except_wizard) \ + or isinstance(e, except_osv) \ + or isinstance(e, except_orm): + self.abortResponse(2, e.name, 'warning', e.value) + else: + raise return res def execute(self, db, uid, data, state='init', context=None): |
