aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bachelier <laurent@bachelier.name>2010-05-29 01:19:03 +0200
committerLaurent Bachelier <laurent@bachelier.name>2010-05-29 01:19:03 +0200
commit942fb3cc9a0d1d752cacaa10dd5504c65dde16c2 (patch)
tree16921f9df3d4cdfb3c5e397e3ce0325c98f9e4a0
parentWorkaround for Python 2.5; simplified namespaces (diff)
downloadconfman-942fb3cc9a0d1d752cacaa10dd5504c65dde16c2.tar.xz
Simpler code
-rw-r--r--confman.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/confman.py b/confman.py
index fefb7a3..304d3d4 100644
--- a/confman.py
+++ b/confman.py
@@ -184,6 +184,8 @@ class ProgrammableAction(Action):
Get limited environment execution.
This function could be overloaded to add some custom methods.
"""
+ options = self.config.options
+
def redirect(filename):
raise SymlinkForwarder("_"+filename)
@@ -193,15 +195,7 @@ class ProgrammableAction(Action):
def ignore():
raise IgnoreForwarder()
- exec_env = \
- {
- "options": self.config.options,
- "redirect": redirect,
- "empty": empty,
- "ignore": ignore,
- }
-
- return exec_env
+ return locals()
def check(self):
source = self.source_path()