server/sources/storages.py
changeset 5696 98d390c28edb
parent 5627 a7e40cccdc9b
parent 5693 8af6623f3d4e
child 5863 4495b9bc49df
--- a/server/sources/storages.py	Wed Jun 09 09:58:23 2010 +0200
+++ b/server/sources/storages.py	Wed Jun 09 10:06:46 2010 +0200
@@ -16,11 +16,12 @@
 # You should have received a copy of the GNU Lesser General Public License along
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
 """custom storages for the system source"""
+
 from os import unlink, path as osp
 
 from yams.schema import role_name
 
-from cubicweb import Binary
+from cubicweb import Binary, ValidationError
 from cubicweb.server import hook
 
 def set_attribute_storage(repo, etype, attr, storage):
@@ -157,7 +158,7 @@
         fspath = uniquify_path(self.default_directory, '_'.join(basename))
         if fspath is None:
             msg = entity._cw._('failed to uniquify path (%s, %s)') % (
-                dirpath, '_'.join(basename))
+                self.default_directory, '_'.join(basename))
             raise ValidationError(entity.eid, {role_name(attr, 'subject'): msg})
         return fspath