[Mpuls-commits] r2191 - wasko/branches/2.0/mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Mar 25 16:15:28 CET 2010


Author: torsten
Date: 2010-03-25 16:15:24 +0100 (Thu, 25 Mar 2010)
New Revision: 2191

Modified:
   wasko/branches/2.0/mpulsweb/model/agencysettings.py
Log:
* mpulsweb/model/agencysettings.py (Agency._loadDefaultStatement):
Deleted. Not used anymore.


Modified: wasko/branches/2.0/mpulsweb/model/agencysettings.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/agencysettings.py	2010-03-25 13:48:39 UTC (rev 2190)
+++ wasko/branches/2.0/mpulsweb/model/agencysettings.py	2010-03-25 15:15:24 UTC (rev 2191)
@@ -34,6 +34,7 @@
 
 import psycopg2.extras
 
+from mpulsweb.lib.base import render 
 from mpulsweb.lib.config import get_path
 from mpulsweb.lib.db import db
 from mpulsweb.lib.helpers import ensure_unicode
@@ -100,25 +101,10 @@
     def getMaxSavetime(self):
         return self.conf.get('max_speicherdauer', u'')
 
-    def _loadDefaultStatement(self, filename):
-        # XXX: Dead ugly!
-        f = None
-        try:
-            f = open(filename, "r")
-            statement = f.read()
-        finally:
-            if f:
-                try:
-                    f.close()
-                except:
-                    pass
-        return unicode(statement, 'utf-8')
-
     def getPrivacyStatement(self):
         form = self.conf.get('ee_formular', '')
         if len(form) > 0:
             return form
-        return self._loadDefaultStatement(get_path('formed',
-                                                   'privacy_statement.html'))
+        return render('/privacy/default/privacy_statement.html')
 
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8:



More information about the Mpuls-commits mailing list