goa/goaconfig.py
branchtls-sprint
changeset 1802 d628defebc17
parent 1132 96752791c2b6
child 1977 606923dff11b
--- a/goa/goaconfig.py	Thu May 14 10:24:56 2009 +0200
+++ b/goa/goaconfig.py	Thu May 14 11:38:40 2009 +0200
@@ -1,7 +1,7 @@
 """google appengine configuration
 
 :organization: Logilab
-:copyright: 2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+:copyright: 2008-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
 __docformat__ = "restructuredtext en"
@@ -32,7 +32,7 @@
     """repository and web application in the same twisted process"""
     name = 'app'
     repo_method = 'inmemory'
-    options = merge_options(( 
+    options = merge_options((
         ('included-cubes',
          {'type' : 'csv',
           'default': [],
@@ -75,7 +75,7 @@
           'anonymous access using the app.yaml file)',
           'group': 'main', 'inputlevel': 1,
           }),
-        
+
         ) + WebConfiguration.options + ServerConfiguration.options)
     options = [(optname, optdict) for optname, optdict in options
                if not optname in UNSUPPORTED_OPTIONS]
@@ -94,10 +94,10 @@
     # deactivate some hooks during [pre|post]create scripts execution
     # (unique values check, owned_by/created_by relations setup)
     free_wheel = True
-    
+
     if not os.environ.get('APYCOT_ROOT'):
         CUBES_DIR = join(CW_SOFTWARE_ROOT, '../cubes')
-    
+
     def __init__(self, appid, apphome=None):
         if apphome is None:
             apphome = 'data'
@@ -111,7 +111,7 @@
         if key == 'base-url':
             return self._base_url
         return super(GAEConfiguration, self).__getitem__(key)
-    
+
     # overriden from cubicweb base configuration
 
     @property
@@ -136,15 +136,15 @@
 
     def instance_md5_version(self):
         return ''
-    
+
     def _init_base_url(self):
         pass
-    
+
     # overriden from cubicweb server configuration
-    
+
     def sources(self):
         return {'system': {'adapter': 'gae'}}
-    
+
     def load_schema(self, schemaclasses=None, extrahook=None):
         try:
             return self._schema
@@ -155,10 +155,11 @@
     # goa specific
     def repo_session(self, sessionid):
         return self.repository()._sessions[sessionid]
-    
+
     def is_anonymous_user(self, login):
         if self['use-google-auth']:
             from google.appengine.api import users
             return users.get_current_user() is None
         else:
             return login == self.anonymous_user()[0]
+