From 5369eb78ade446413fb1d1a7c553920c6a6187d6 Mon Sep 17 00:00:00 2001 From: helmutm Date: Tue, 1 May 2007 09:05:41 +0000 Subject: [PATCH] make migrateStorage() more tolerant: no migration when no adapter found git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1706 fd906abe-77d9-0310-91a1-e0d9ade77398 --- resource.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resource.py b/resource.py index 1017b84..ead05d9 100644 --- a/resource.py +++ b/resource.py @@ -227,7 +227,9 @@ class Resource(Image, Contained): oldAdapted = newAdapted = context oldTi = removeSecurityProxy(oldType.typeInterface) if oldTi is not None: - oldAdapted = oldTi(context) + oldAdapted = oldTi(context, None) + if oldAdapted is None: # nothing to migrate + return newTi = removeSecurityProxy(newType.typeInterface) newOptions = {} if newTi is not None: