Commit e568dc1f authored by Fred Drake's avatar Fred Drake

Minor code cleanliness nit.

parent d8853f5e
...@@ -15,9 +15,10 @@ ...@@ -15,9 +15,10 @@
Zope object encapsulating a Page Template. Zope object encapsulating a Page Template.
""" """
__version__='$Revision: 1.33 $'[11:-2] __version__='$Revision: 1.34 $'[11:-2]
import os, AccessControl, Acquisition, sys import os, AccessControl, Acquisition, sys
from types import StringType
from Globals import DTMLFile, ImageFile, MessageDialog, package_home from Globals import DTMLFile, ImageFile, MessageDialog, package_home
from zLOG import LOG, ERROR, INFO from zLOG import LOG, ERROR, INFO
from OFS.SimpleItem import SimpleItem from OFS.SimpleItem import SimpleItem
...@@ -129,7 +130,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable, ...@@ -129,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 type(file) is not type(''): if 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