diff options
author | makefu <root@pigstarter.de> | 2013-12-18 22:52:48 +0100 |
---|---|---|
committer | makefu <root@pigstarter.de> | 2013-12-18 22:52:51 +0100 |
commit | 82deb81c8a147cfd5cd7e22e7f69b1a81e78c896 (patch) | |
tree | 092cd75eb3d8de72c3073aec760bd2f39243f019 /Reaktor/commands/caps | |
parent | f6580d4dad2224c79577e08a1e2f2e7186e2bed5 (diff) |
Reaktor: caps resolver is now pythonic
Diffstat (limited to 'Reaktor/commands/caps')
-rwxr-xr-x | Reaktor/commands/caps | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Reaktor/commands/caps b/Reaktor/commands/caps index eb1d97a6..a9ce4519 100755 --- a/Reaktor/commands/caps +++ b/Reaktor/commands/caps @@ -8,12 +8,5 @@ def load_config(filename): file, pathname, description = imp.find_module(modname, [ dirname ]) return imp.load_module(modname, file, pathname, description) -def not_none(x): - return x != None - -def pluck(name): - return lambda x: name in x.keys() and x[name] or None - config = load_config(os.environ['config_filename']) - -print(' '.join(filter(not_none, map(pluck('capname'), config.irc_commands)))) +print(' '.join(filter(None,[ x.get('capname',None) for x in config.irc_commands]))) |