From e43deb371e73575395e115d2badd572c82009707 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Mon, 2 Jan 2023 14:38:58 +0100 Subject: [PATCH] os.Environment: Add field time_stamp Signed-off-by: Jan Lindemann --- src/python/devtest/os/Environment.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/python/devtest/os/Environment.py b/src/python/devtest/os/Environment.py index 8e8efcf..efa3026 100644 --- a/src/python/devtest/os/Environment.py +++ b/src/python/devtest/os/Environment.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from datetime import datetime from .Connections import Connections from jwutils import Options from jwutils.log import * @@ -8,12 +9,15 @@ class Environment: def __init__(self, cmd, args): self.args = args - self.cmd = cmd - self.connections = Connections() self.features = Options(args.features) + slog(INFO, "Features:") + for ft in self.features: + slog(INFO, " {}".format(ft)) + self.cmd = cmd + self.time_stamp = datetime.now().strftime("%Y%m%d-%H%M%S") + self.connections = Connections() for spec in args.connection: self.connections.append(spec) - slog(INFO, "Features = {}".format(self.features)) def conf_value(self, path, default=None): return self.cmd.conf_value(path, default)