Commit c8beeeab authored by Albertas Agejevas's avatar Albertas Agejevas

Import StorageException from ZODB when needed

parent 6661050a
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
Zope object encapsulating a Page Template from the filesystem. Zope object encapsulating a Page Template from the filesystem.
""" """
__version__='$Revision: 1.17 $'[11:-2] __version__='$Revision: 1.18 $'[11:-2]
import os, AccessControl, Acquisition, sys import os, AccessControl, Acquisition, sys
from Globals import package_home, DevelopmentMode from Globals import package_home, DevelopmentMode
...@@ -138,8 +138,6 @@ class PageTemplateFile(Script, PageTemplate, Traversable): ...@@ -138,8 +138,6 @@ class PageTemplateFile(Script, PageTemplate, Traversable):
__roles__ = ComputedAttribute(_get__roles__, 1) __roles__ = ComputedAttribute(_get__roles__, 1)
def __getstate__(self): def __getstate__(self):
from ZODB.POSException import StorageError
raise StorageError, ("Instance of AntiPersistent class %s " raise StorageError, ("Instance of AntiPersistent class %s "
"cannot be stored." % self.__class__.__name__) "cannot be stored." % self.__class__.__name__)
class StorageError(Exception):
pass
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment