[Mpuls-commits] r932 - in wasko/branches/2.0: . waskaweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jan 26 20:33:45 CET 2010
Author: bh
Date: 2010-01-26 20:33:43 +0100 (Tue, 26 Jan 2010)
New Revision: 932
Modified:
wasko/branches/2.0/ChangeLog
wasko/branches/2.0/waskaweb/model/agencysettings.py
Log:
* waskaweb/model/agencysettings.py: Fix formatting
Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog 2010-01-26 19:08:52 UTC (rev 931)
+++ wasko/branches/2.0/ChangeLog 2010-01-26 19:33:43 UTC (rev 932)
@@ -1,5 +1,9 @@
2010-01-26 Bernhard Herzog <bh at intevation.de>
+ * waskaweb/model/agencysettings.py: Fix formatting
+
+2010-01-26 Bernhard Herzog <bh at intevation.de>
+
* waskaweb/model/case.py: Remove unused imports
2010-01-26 Bernhard Herzog <bh at intevation.de>
Modified: wasko/branches/2.0/waskaweb/model/agencysettings.py
===================================================================
--- wasko/branches/2.0/waskaweb/model/agencysettings.py 2010-01-26 19:08:52 UTC (rev 931)
+++ wasko/branches/2.0/waskaweb/model/agencysettings.py 2010-01-26 19:33:43 UTC (rev 932)
@@ -1,46 +1,52 @@
# -*- coding: utf-8 -*-
#
# Copyright 2007, 2008 Intevation GmbH, Germany, <info at intevation.de>
-#
-# This file is part of mpuls WASKA (CoMPUter-based case fiLeS -
+#
+# This file is part of mpuls WASKA (CoMPUter-based case fiLeS -
# Web-Anwendungs-Server fuer Kompetenzagenturen).
-#
+#
# mpuls WASKA is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
-#
+#
# mpuls WASKA is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
-#
+#
# You should have received a copy of the GNU Affero General Public
# License along with mpuls WASKA. If not, see <http://www.gnu.org/licenses/>.
-#
-# mpuls WASKA has been developed on behalf of the
+#
+# mpuls WASKA has been developed on behalf of the
# Projekttraeger im Deutschen Zentrum fuer Luft- und Raumfahrt e.V. (PT-DLR)
# within the programme Kompetenzagenturen (Durchfuehrungsphase) funded by
-# the Bundesministerium fuer Familie, Senioren, Frauen und Jugend and
+# the Bundesministerium fuer Familie, Senioren, Frauen und Jugend and
# European Social Fund resources.
#
# Authors:
# Torsten <irlaender at intevation.de>
#
-import psycopg2.extras
+
+import sys
import os
-from waskaweb.lib.config import get_path
-from waskaweb.model.statement import *
-
import traceback
-import sys
+import psycopg2.extras
+
+from waskaweb.lib.config import get_path
from waskaweb.lib.db import db
+from waskaweb.model.statement import *
+
+
FETCH_SETTINGS_SQL = """SELECT bez, wert from ka_konfiguration_tbl_view"""
-STORE_SETTINGS_SQL = """UPDATE ka_konfiguration_tbl_view SET wert = %(wert)s WHERE bez = %(bez)s"""
+STORE_SETTINGS_SQL = """\
+UPDATE ka_konfiguration_tbl_view SET wert = %(wert)s WHERE bez = %(bez)s"""
+
class Agency:
+
def __init__(self):
self.conf = {}
self._fetchData()
@@ -67,12 +73,15 @@
cur = None
try:
cur = conn.cursor()
- cur.execute(STORE_SETTINGS_SQL, {'bez': key, 'wert': value})
+ cur.execute(STORE_SETTINGS_SQL,
+ {'bez': key, 'wert': value})
conn.commit()
finally:
if cur:
- try: cur.close()
- except: pass
+ try:
+ cur.close()
+ except:
+ pass
finally:
db.recycleConnection(conn)
except:
@@ -86,10 +95,10 @@
return unicode(str(self.conf.get('fkz', '')), 'utf-8')
def getName(self):
- return unicode(str(self.conf.get('ka_name', '')), 'utf-8')
+ return unicode(str(self.conf.get('ka_name', '')), 'utf-8')
def getMaxSavetime(self):
- return unicode(str(self.conf.get('max_speicherdauer', '')), 'utf-8')
+ return unicode(str(self.conf.get('max_speicherdauer', '')), 'utf-8')
def _loadDefaultStatement(self, filename):
# XXX: Dead ugly!
@@ -99,20 +108,24 @@
statement = f.read()
finally:
if f:
- try: f.close()
- except: pass
- return unicode(statement, 'utf-8')
-
+ try:
+ f.close()
+ except:
+ pass
+ return unicode(statement, 'utf-8')
+
def getPrivacyStatement(self):
form = self.conf.get('ee_formular', '')
if len(form) > 0:
return unicode(form, 'utf-8')
- return self._loadDefaultStatement(get_path('formed','privacy_statement.html'))
+ return self._loadDefaultStatement(get_path('formed',
+ 'privacy_statement.html'))
def getDiscretionStatement(self):
form = self.conf.get('ud_formular', '')
if len(form) > 0:
return unicode(form, 'utf-8')
- return self._loadDefaultStatement(get_path('formed','discretion_statement.html'))
+ return self._loadDefaultStatement(get_path('formed',
+ 'discretion_statement.html'))
# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8:
More information about the Mpuls-commits
mailing list