# HG changeset patch # User Sylvain Thénault # Date 1308759896 -7200 # Node ID 2d4ba5b984dc13cf114c2bc23d15a965ccbb64f7 # Parent 183a61d1bab97ce253e2873f7cf3529c7e1dafbe cleanup diff -r 183a61d1bab9 -r 2d4ba5b984dc hooks/syncschema.py --- a/hooks/syncschema.py Wed Jun 22 18:23:44 2011 +0200 +++ b/hooks/syncschema.py Wed Jun 22 18:24:56 2011 +0200 @@ -263,7 +263,7 @@ for rtype in (META_RTYPES - VIRTUAL_RTYPES): try: rschema = schema[rtype] - except: + except KeyError: if rtype == 'cw_source': continue # XXX 3.10 migration raise diff -r 183a61d1bab9 -r 2d4ba5b984dc server/sources/native.py --- a/server/sources/native.py Wed Jun 22 18:23:44 2011 +0200 +++ b/server/sources/native.py Wed Jun 22 18:24:56 2011 +0200 @@ -677,7 +677,7 @@ for subject, object in subj_obj_list: self._record_tx_action(session, 'tx_relation_actions', 'A', eid_from=subject, rtype=rtype, eid_to=object) - + def _add_relations(self, session, rtype, subj_obj_list, inlined=False): """add a relation to the source""" sql = [] @@ -747,7 +747,7 @@ session.pool.connection(self.uri).rollback() if self.repo.config.mode != 'test': self.critical('transaction has been rollbacked') - except: + except Exception, ex: pass if ex.__class__.__name__ == 'IntegrityError': # need string comparison because of various backends @@ -1605,7 +1605,7 @@ * a list of rows (as tuples with one element per column) Tables are saved in chunks in different files in order to prevent - a too high memory consumption. + a too high memory consumption. """ def __init__(self, source): """