File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ def change_version(version_str):
218
218
def version_decorator (obj ):
219
219
match = VERSION_RE .match (version_str )
220
220
if not match :
221
- raise Exception ("change_version decorator must be in format [saas(-|~)<int:version>.<int:subversion:int>]" )
221
+ raise ValueError ("change_version decorator must be in format [saas(-|~)<int:version>.<int:subversion:int>]" )
222
222
(_ , version , sub_version ) = match .groups ()
223
223
obj .change_version = (int (version ), int (sub_version ))
224
224
return obj
@@ -322,7 +322,7 @@ def commit(self):
322
322
if self .dbname == config ["log_db" ].split ("/" )[- 1 ]:
323
323
self ._cnx .commit ()
324
324
else :
325
- raise Exception ("Commit are forbidden in integrity cases" )
325
+ raise RuntimeError ("Commit is forbidden in integrity cases" )
326
326
327
327
patcher = patch .object (odoo .sql_db .Cursor , "commit" , commit )
328
328
patcher .start ()
You can’t perform that action at this time.
0 commit comments