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

Sylvain Thenault sylvain.thenault at logilab.fr
Thu Mar 9 17:12:30 CET 2017


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


More information about the saem-devel mailing list