From 3d56204f92255827bdef257cf2b5a79bdd9947fc Mon Sep 17 00:00:00 2001 From: nvbn Date: Mon, 7 Sep 2015 19:13:17 +0300 Subject: [PATCH] Update readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f24018eb..ebb12c1b 100644 --- a/README.md +++ b/README.md @@ -245,18 +245,18 @@ and optional `enabled_by_default`, `requires_output` and `priority` variables. Simple example of the rule for running script with `sudo`: ```python -def match(command, settings): +def match(command): return ('permission denied' in command.stderr.lower() or 'EACCES' in command.stderr) -def get_new_command(command, settings): +def get_new_command(command): return 'sudo {}'.format(command.script) # Optional: enabled_by_default = True -def side_effect(command, settings): +def side_effect(command, fixed_command): subprocess.call('chmod 777 .', shell=True) priority = 1000 # Lower first, default is 1000