diff options
| author | Chris McDonough <chrism@plope.com> | 2010-12-03 17:22:48 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2010-12-03 17:22:48 -0500 |
| commit | 4974b71afa772b6c734b6c7a34c2edbab925d7b6 (patch) | |
| tree | 184d5cceb71ca3cb729226c312b81ebec0812cac | |
| parent | c0d4a18a2e408af56b6d5611cca694ad944f1dfc (diff) | |
| download | pyramid-4974b71afa772b6c734b6c7a34c2edbab925d7b6.tar.gz pyramid-4974b71afa772b6c734b6c7a34c2edbab925d7b6.tar.bz2 pyramid-4974b71afa772b6c734b6c7a34c2edbab925d7b6.zip | |
all tests pass
| -rw-r--r-- | pyramid/configuration.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/pyramid/configuration.py b/pyramid/configuration.py index bdf2e562c..d2d2fb73c 100644 --- a/pyramid/configuration.py +++ b/pyramid/configuration.py @@ -375,9 +375,8 @@ class Configurator(object): # API def commit(self): - """ Commit the current set of configuration actions. """ - context = self.registry.ctx - context.execute_actions() + """ Commit pending configuration actions. """ + self.registry.ctx.execute_actions() self.registry.reset_context() def with_package(self, package): @@ -703,7 +702,7 @@ class Configurator(object): context = registry.ctx try: context.package = package - xmlconfig.file(filename, package, context=context, execute=True) + xmlconfig.file(filename, package, context=context, execute=False) finally: lock.release() self.manager.pop() @@ -1123,10 +1122,6 @@ class Configurator(object): containment=containment, request_type=request_type, custom=custom_predicates) - if permission is None: - # intent: will be None if no default permission is registered - permission = self.registry.queryUtility(IDefaultPermission) - if renderer is not None and not isinstance(renderer, dict): renderer = {'name':renderer, 'package':self.package} @@ -1141,7 +1136,11 @@ class Configurator(object): _info = self.ctx_info() - def register(): + def register(permission=permission): + + if permission is None: + # intent: will be None if no default permission is registered + permission = self.registry.queryUtility(IDefaultPermission) # NO_PERMISSION_REQUIRED handled by _secure_view derived_view = self._derive_view(view, permission, predicates, attr, |
