Commit 4c53db31 authored by Fred Drake's avatar Fred Drake

Change it back -- Casey tells me it should be tolerant of objects derived

from ExtensionClass, and reminded me that the 2.1 version of isinstance()
does not deal with the more general constructs that newer versions of
Python can handle.
parent f5405e57
......@@ -15,7 +15,7 @@
Zope object encapsulating a Page Template.
"""
__version__='$Revision: 1.35 $'[11:-2]
__version__='$Revision: 1.36 $'[11:-2]
import os, AccessControl, Acquisition, sys
from types import StringType
......@@ -130,7 +130,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
if SUPPORTS_WEBDAV_LOCKS and self.wl_isLocked():
raise ResourceLockedError, "File is locked via WebDAV"
if not isinstance(file, StringType):
if type(file) is not StringType:
if not file: raise ValueError, 'File not specified'
file = file.read()
......
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