httpd, netrpcd: do not catch any exceptions
always only catch Exception. Conflicts: bin/service/netrpc_server.py bin/service/web_services.py bin/service/websrv_lib.py bzr revid: p_christ@hol.gr-20100726093335-08uzfv3cr9ffx1ue
This commit is contained in:
parent
d0eb1d7516
commit
40758b5222
|
@ -48,7 +48,8 @@ class TinySocketClientThread(threading.Thread, netsvc.OpenERPDispatcher):
|
|||
try:
|
||||
self.socket.shutdown(
|
||||
getattr(socket, 'SHUT_RDWR', 2))
|
||||
except Exception: pass
|
||||
except Exception:
|
||||
pass
|
||||
# That should garbage-collect and close it, too
|
||||
self.sock = None
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ class db(netsvc.ExportService):
|
|||
else:
|
||||
cr.execute("select decode(datname, 'escape') from pg_database where datname not in('template0', 'template1','postgres') order by datname")
|
||||
res = [str(name) for (name,) in cr.fetchall()]
|
||||
except:
|
||||
except Exception:
|
||||
res = []
|
||||
finally:
|
||||
cr.close()
|
||||
|
@ -497,7 +497,7 @@ GNU Public Licence.
|
|||
try:
|
||||
try:
|
||||
base64_decoded = base64.decodestring(zips[module])
|
||||
except:
|
||||
except Exception:
|
||||
l.notifyChannel('migration', netsvc.LOG_ERROR, 'unable to read the module %s' % (module,))
|
||||
raise
|
||||
|
||||
|
@ -506,13 +506,13 @@ GNU Public Licence.
|
|||
try:
|
||||
try:
|
||||
tools.extract_zip_file(zip_contents, tools.config['addons_path'] )
|
||||
except:
|
||||
except Exception:
|
||||
l.notifyChannel('migration', netsvc.LOG_ERROR, 'unable to extract the module %s' % (module, ))
|
||||
rmtree(module)
|
||||
raise
|
||||
finally:
|
||||
zip_contents.close()
|
||||
except:
|
||||
except Exception:
|
||||
l.notifyChannel('migration', netsvc.LOG_ERROR, 'restore the previous version of the module %s' % (module, ))
|
||||
nmp = os.path.join(backup_directory, module)
|
||||
if os.path.isdir(nmp):
|
||||
|
|
Loading…
Reference in New Issue