commit ee93d221c3082a2bee33a07e2844ae993b1b7ec8
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Thu Jun 21 11:23:56 2012 +0200
Logs: Fixing unused constructor parameter
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)
Show replies by date