From: Radek Pazdera <rpazdera(a)redhat.com>
The `date' parameter of Logs class constructor was unused. Now it's
taken into account correctly and the specified date value is used
instead of datetime.now() value.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
---
Common/Logs.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Common/Logs.py b/Common/Logs.py
index 44d4f98..961e158 100644
--- a/Common/Logs.py
+++ b/Common/Logs.py
@@ -197,7 +197,10 @@ class Logs:
cls.logFolder = os.path.dirname(sys.argv[0])
cls.logger = logger
cls.debug = debug
- cls.date = datetime.datetime.now().strftime("%Y-%m-%d_%H:%M:%S")
+ if date is None:
+ cls.date = datetime.datetime.now().strftime("%Y-%m-%d_%H:%M:%S")
+ else:
+ cls.date = date
cls.nameExtend = nameExtend
cls.root_path = cls.prepare_logging(debug, waitForNet,
recipe_path, to_display)
--
1.7.7.6
Show replies by thread