os.Environment: Add field time_stamp

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2023-01-02 14:38:58 +01:00
commit e43deb371e

View file

@ -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)