[Zope3-checkins] CVS: Zope3/src/zope/pagetemplate - pagetemplatefile.py:1.7

Jim Fulton jim@zope.com
Fri, 2 May 2003 14:25:53 -0400


Update of /cvs-repository/Zope3/src/zope/pagetemplate
In directory cvs.zope.org:/tmp/cvs-serv30302

Modified Files:
	pagetemplatefile.py 
Log Message:
Added check to make sure file exists.


=== Zope3/src/zope/pagetemplate/pagetemplatefile.py 1.6 => 1.7 ===
--- Zope3/src/zope/pagetemplate/pagetemplatefile.py:1.6	Mon Apr  7 15:24:36 2003
+++ Zope3/src/zope/pagetemplate/pagetemplatefile.py	Fri May  2 14:25:52 2003
@@ -38,6 +38,8 @@
     def __init__(self, filename, _prefix=None):
         path = self.get_path_from_prefix(_prefix)
         self.filename = os.path.join(path, filename)
+        if not os.path.isfile(self.filename):
+            raise ValueError("No such file", self.filename)
 
     def get_path_from_prefix(self, _prefix):
         if isinstance(_prefix, str):