From bb73429646f2bb416342e0f75ebb1cdb0555eada Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 21 Sep 2011 15:28:53 +0200 Subject: [PATCH] cleanup the trace_file thing --- system/TestMain.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/system/TestMain.py b/system/TestMain.py index 43405d9..6fba5c3 100755 --- a/system/TestMain.py +++ b/system/TestMain.py @@ -125,7 +125,6 @@ steps refer to a method in TestPlc or to a step_* module parser.add_option("-r","--restart-nm", action="store_true", dest="forcenm", default=False, help="Force the NM to restart in ssh_slices step") parser.add_option("-t","--trace", action="store", dest="trace_file", default=None, - #default="logs/trace-@TIME@.txt", help="Trace file location") (self.options, self.args) = parser.parse_args() @@ -328,17 +327,11 @@ steps refer to a method in TestPlc or to a step_* module # init & open trace file if provided if self.options.trace_file and not self.options.dry_run: - time=strftime("%H-%M") - date=strftime("%Y-%m-%d") - trace_file=self.options.trace_file - trace_file=trace_file.replace("@TIME@",time) - trace_file=trace_file.replace("@DATE@",date) - self.options.trace_file=trace_file # create dir if needed - trace_dir=os.path.dirname(trace_file) + trace_dir=os.path.dirname(self.options.trace_file) if trace_dir and not os.path.isdir(trace_dir): os.makedirs(trace_dir) - trace=open(trace_file,"w") + trace=open(self.options.trace_file,"w") # do all steps on all plcs TIME_FORMAT="%H-%M-%S" -- 2.43.0