Parcourir la source

[trac547] removed unnecessary size limitation for a template file

Naoki Kambe il y a 14 ans
Parent
commit
0dc2e2582d
1 fichiers modifiés avec 4 ajouts et 8 suppressions
  1. 4 8
      src/bin/stats/stats_httpd.py.in

+ 4 - 8
src/bin/stats/stats_httpd.py.in

@@ -55,10 +55,6 @@ XSL_URL_PATH = '/bind10/statistics/xsl'
 XSD_NAMESPACE = 'http://bind10.isc.org' + XSD_URL_PATH
 DEFAULT_CONFIG = dict(listen_on=[('127.0.0.1', 8000)])
 
-# The size of template file should be under 100k. TODO: should be
-# considered later.
-MAX_SIZE_OF_TEMPLATE = 102400
-
 # Assign this process name
 isc.util.process.rename()
 
@@ -474,11 +470,11 @@ class StatsHttpd:
         return self.xsl_body
 
     def open_template(self, file_name):
-        """Opens a template file with size limitation, loads all lines to a
-        string variable and returns string.Template object include the
-        variable."""
+        """It opens a template file, and it loads all lines to a
+        string variable and returns string. Template object includes
+        the variable. Limitation of a file size isn't needed there."""
         lines = "".join(
-            open(file_name, 'r').readlines(MAX_SIZE_OF_TEMPLATE))
+            open(file_name, 'r').readlines())
         assert lines is not None
         return string.Template(lines)