mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-devtest
synced 2026-01-15 10:23:32 +01:00
os.Environment: Add field time_stamp
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
22de74795b
commit
e43deb371e
1 changed files with 7 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue