From db86e80a6cb4bf3e5c5b435202323783c445f6d1 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 25 Apr 2014 14:18:25 +0200 Subject: fix {} in default_command function --- config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config.py b/config.py index 7f3f9c4..5858532 100644 --- a/config.py +++ b/config.py @@ -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.*))?$', -- cgit v1.2.3