[PATCH 2 of 2 eac] Do not use bare "except" in ccplugin.py

Sylvain Thénault sylvain.thenault at logilab.fr
Tue Dec 19 10:52:41 CET 2017


applied this one, thx


On 18/12/2017 15:36, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis.laxalde at logilab.fr>
> # Date 1513607754 -3600
> #      Mon Dec 18 15:35:54 2017 +0100
> # Node ID c98fc10fe08073eae531764f35e523a64e392672
> # Parent  0553a7429acaaba90617cddd09b50f89b3842338
> Do not use bare "except" in ccplugin.py
>
> Flake8 now complains about this.
>
> diff --git a/cubicweb_eac/ccplugin.py b/cubicweb_eac/ccplugin.py
> --- a/cubicweb_eac/ccplugin.py
> +++ b/cubicweb_eac/ccplugin.py
> @@ -96,7 +96,7 @@ def eac_import_file(service, store, fpat
>              created, updated, record_eid, not_visited = service.import_eac_stream(
>                  stream, import_log, extid2eid=extid2eid, store=store)
>              return created, updated
> -        except:
> +        except Exception:
>              if raise_on_error:
>                  raise
>              return 0, 0
>

-- 
Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (05.62.17.16.42)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org



More information about the saem-devel mailing list