From 2d31f33038b6113ea5b6bb70e08b98a0701ff693 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 9 Aug 2013 13:26:11 +0200 Subject: [PATCH] Move call_args definition to recording --- sith.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sith.py b/sith.py index 999b9973..524821ce 100755 --- a/sith.py +++ b/sith.py @@ -78,9 +78,6 @@ class TestCase(object): if operation not in self.operations: raise ValueError("%s is not a valid operation" % operation) - # Store call arguments - self.call_args = (operation, path, line, column, traceback) - # Set other attributes self.operation = operation self.path = path @@ -128,8 +125,9 @@ class TestCase(object): except Exception: self.traceback = traceback.format_exc() if record is not None: + call_args = (self.operation, self.path, self.line, self.column, self.traceback) with open(record, 'w') as f: - json.dump(self.call_args, f) + json.dump(call_args, f) self.show_errors() if debugger: einfo = sys.exc_info()