[PATCH 2 of 2 saem_ref] [eac] Replace ark's / by - in filename as well

Sylvain Thénault sylvain.thenault at logilab.fr
Thu Mar 9 17:46:06 CET 2017


break CI, will send a V2


Le 09/03/2017 à 17:12, Sylvain Thenault a écrit :
> # HG changeset patch
> # User Sylvain Thénault <sylvain.thenault at logilab.fr>
> # Date 1489075398 -3600
> #      Thu Mar 09 17:03:18 2017 +0100
> # Node ID d25f753a85c4d86ba555490065f5cac0a772bb86
> # Parent  4a0aabd394ca9b0d374e510223b37eefc733af84
> [eac] Replace ark's / by - in filename as well
>
> for consistency with recordId.
>
> diff --git a/cubicweb_saem_ref/entities/eac.py b/cubicweb_saem_ref/entities/eac.py
> --- a/cubicweb_saem_ref/entities/eac.py
> +++ b/cubicweb_saem_ref/entities/eac.py
> @@ -41,11 +41,11 @@ class AuthorityRecordEACAdapter(eac.Auth
>  
>      @property
>      def file_name(self):
>          """Return a file name for the dump."""
>          if self.entity.ark:
> -            name = self.entity.ark.replace("/", "_")
> +            name = self.entity.ark.replace("/", "-")
>              return u'EAC_{0}.xml'.format(name)
>          return super(AuthorityRecordEACAdapter, self).file_name
>  
>      def recordid_element(self, control_elt):
>          # export ark in <recordId>
>

-- 
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