Commit 36d28b31 authored by Fred Drake's avatar Fred Drake

But no need to introduce a bug in the process!

parent e568dc1f
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
Zope object encapsulating a Page Template. Zope object encapsulating a Page Template.
""" """
__version__='$Revision: 1.34 $'[11:-2] __version__='$Revision: 1.35 $'[11:-2]
import os, AccessControl, Acquisition, sys import os, AccessControl, Acquisition, sys
from types import StringType from types import StringType
...@@ -130,7 +130,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable, ...@@ -130,7 +130,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
if SUPPORTS_WEBDAV_LOCKS and self.wl_isLocked(): if SUPPORTS_WEBDAV_LOCKS and self.wl_isLocked():
raise ResourceLockedError, "File is locked via WebDAV" raise ResourceLockedError, "File is locked via WebDAV"
if isinstance(file, StringType): if not isinstance(file, StringType):
if not file: raise ValueError, 'File not specified' if not file: raise ValueError, 'File not specified'
file = file.read() 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