@@ -35,7 +35,7 @@ def get_new_command(command, settings):
|
||||
.format(dir=_tar_file(command.script)[1], cmd=command.script)
|
||||
|
||||
|
||||
def side_effect(command, settings):
|
||||
with tarfile.TarFile(_tar_file(command.script)[0]) as archive:
|
||||
def side_effect(old_cmd, command, settings):
|
||||
with tarfile.TarFile(_tar_file(old_cmd.script)[0]) as archive:
|
||||
for file in archive.getnames():
|
||||
os.remove(file)
|
||||
|
||||
@@ -30,8 +30,8 @@ def get_new_command(command, settings):
|
||||
return '{} -d {}'.format(command.script, _zip_file(command)[:-4])
|
||||
|
||||
|
||||
def side_effect(command, settings):
|
||||
with zipfile.ZipFile(_zip_file(command), 'r') as archive:
|
||||
def side_effect(old_cmd, command, settings):
|
||||
with zipfile.ZipFile(_zip_file(old_cmd), 'r') as archive:
|
||||
for file in archive.namelist():
|
||||
os.remove(file)
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ def get_new_command(command, settings):
|
||||
return command.script
|
||||
|
||||
|
||||
def side_effect(command, settings):
|
||||
offending = offending_pattern.findall(command.stderr)
|
||||
def side_effect(old_cmd, command, settings):
|
||||
offending = offending_pattern.findall(old_cmd.stderr)
|
||||
for filepath, lineno in offending:
|
||||
with open(filepath, 'r') as fh:
|
||||
lines = fh.readlines()
|
||||
|
||||
Reference in New Issue
Block a user