--- ECHO_content/ECHO_collection.py 2004/05/10 13:51:03 1.75 +++ ECHO_content/ECHO_collection.py 2004/05/10 14:18:33 1.76 @@ -105,22 +105,17 @@ def sendFile(self, filename, type): object = self # look for an object called filename for path in paths: - print "fragment: '"+path+"'" if hasattr(object, path): - print " exists" object = getattr(object, path) else: - print " doesn't exist" object = None break if object: # if the object exists then send it - print "send zope object"+object() - object() + return object.index_html(self.REQUEST.REQUEST, self.REQUEST.RESPONSE) else: # send a local file with the given content-type fn = os.path.join(package_home(globals()), filename) - print "send fs file: "+fn self.REQUEST.RESPONSE.setHeader("Content-Type", type) self.REQUEST.RESPONSE.write(file(fn).read()) return @@ -1255,8 +1250,7 @@ class ECHO_collection(Folder, Persistent def area_img(self): """area image""" - sendFile(self, 'images/red.gif', 'image/gif') - return + return sendFile(self, 'images/red.gif', 'image/gif') def hl_lib_js(self): """javascript"""