Workaround for https://bugs.python.org/issue7980. No issue #
authorTom Clegg <tom@curoverse.com>
Mon, 29 Feb 2016 20:40:14 +0000 (15:40 -0500)
committerTom Clegg <tom@curoverse.com>
Mon, 29 Feb 2016 20:40:14 +0000 (15:40 -0500)
tools/crunchstat-summary/crunchstat_summary/summarizer.py

index f422501b10ff1858f9b636621aaaba4bad662d5b..2ac12abcba23e381073589cf209915b88a9d8cef 100644 (file)
@@ -21,6 +21,11 @@ from crunchstat_summary import logger
 AVAILABLE_RAM_RATIO = 0.95
 
 
+# Workaround datetime.datetime.strptime() thread-safety bug by calling
+# it once before starting threads.  https://bugs.python.org/issue7980
+datetime.datetime.strptime('1999-12-31_23:59:59', '%Y-%m-%d_%H:%M:%S')
+
+
 class Task(object):
     def __init__(self):
         self.starttime = None