diff options
author | makefu <root@pigstarter.de> | 2014-04-25 14:18:25 +0200 |
---|---|---|
committer | makefu <root@pigstarter.de> | 2014-04-25 14:18:25 +0200 |
commit | db86e80a6cb4bf3e5c5b435202323783c445f6d1 (patch) | |
tree | 5e6d253ab541a17d112582ff7143ec3a692d84e6 | |
parent | 8d4c5b69c6d7bb9774b49f68db6570ebd2681505 (diff) |
fix {} in default_command function
-rw-r--r-- | config.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -17,8 +17,8 @@ irc_restart_timeout = 5 irc_channels = [ '#krebs' ] -admin_file='admin.lst' -auth_file='auth.lst' +admin_file=workdir+'/admin.lst' +auth_file=workdir+'/auth.lst' config_filename = abspath(__file__) @@ -26,7 +26,8 @@ config_filename = abspath(__file__) me = '\\b' + re.escape(name) + '\\b' me_or_us = '(?:' + me + '|\\*)' -def default_command(cmd, env={}): +def default_command(cmd, env=None): + if not env: env = {} return { 'capname': cmd, 'pattern': '^' + me_or_us + ':\\s*' + cmd + '\\s*(?:\\s+(?P<args>.*))?$', |