From f458474d50b78783d18f5ddfa9867c8e37d0a86b Mon Sep 17 00:00:00 2001 From: ced <> Date: Thu, 9 Aug 2007 08:18:06 +0000 Subject: [PATCH] fix raise string deprecated in python 2.5 bzr revid: ced-0b69d2b3d88ebe2c98240b3ddeb6cb71c62ebace --- addons/account/wizard/wizard_bank_reconcile.py | 2 +- addons/l10n_ch/dta/dta_wizard.py | 2 +- addons/stock/stock.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/wizard/wizard_bank_reconcile.py b/addons/account/wizard/wizard_bank_reconcile.py index 6b8ded09c2f..200ba453e2a 100644 --- a/addons/account/wizard/wizard_bank_reconcile.py +++ b/addons/account/wizard/wizard_bank_reconcile.py @@ -42,7 +42,7 @@ def _action_open_window(self, cr, uid, data, context): cr.execute('select default_credit_account_id from account_journal where id=%d', (form['journal_id'],)) account_id = cr.fetchone()[0] if not account_id: - raise 'You have to define the bank account\nin the journal definition for reconciliation.' + raise Exception, 'You have to define the bank account\nin the journal definition for reconciliation.' return { 'domain': "[('journal_id','=',%d), ('account_id','=',%d), ('state','<>','draft')]" % (form['journal_id'],account_id), 'name': 'Saisie Standard', diff --git a/addons/l10n_ch/dta/dta_wizard.py b/addons/l10n_ch/dta/dta_wizard.py index af9ca59f463..4e2a03157b2 100644 --- a/addons/l10n_ch/dta/dta_wizard.py +++ b/addons/l10n_ch/dta/dta_wizard.py @@ -202,7 +202,7 @@ class record: Must instanciate a fields list, field = (name,size) and update a local_values dict. """ - raise "not implemented" + raise Exception, "not implemented" def generate(self): res='' diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 809ce643d80..40f9fb38f5b 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -307,7 +307,7 @@ class stock_tracking(osv.osv): return res def unlink(self, cr ,uid, ids): - raise 'You can not remove a lot line !' + raise Exception, 'You can not remove a lot line !' stock_tracking() #----------------------------------------------------------