summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2013-04-27 03:56:20 -0700
committerLance Stout <lancestout@gmail.com>2013-04-27 03:56:20 -0700
commit60cfab995f6669b87554a70a908241658332ac8c (patch)
tree83a07fadb64b1d4414543a7eaf67ea0403c3a9b1 /sleekxmpp
parent8ec18bdb2c7335356799127941cb52ca6b754a01 (diff)
downloadslixmpp-60cfab995f6669b87554a70a908241658332ac8c.tar.gz
slixmpp-60cfab995f6669b87554a70a908241658332ac8c.tar.bz2
slixmpp-60cfab995f6669b87554a70a908241658332ac8c.tar.xz
slixmpp-60cfab995f6669b87554a70a908241658332ac8c.zip
Try preventing strptime thread safety problems.
Fixes #231
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/xmlstream/cert.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/cert.py b/sleekxmpp/xmlstream/cert.py
index fa12f794..71146f36 100644
--- a/sleekxmpp/xmlstream/cert.py
+++ b/sleekxmpp/xmlstream/cert.py
@@ -1,6 +1,10 @@
import logging
from datetime import datetime, timedelta
+# Make a call to strptime before starting threads to
+# prevent thread safety issues.
+datetime.strptime('1970-01-01 12:00:00', "%Y-%m-%d %H:%M:%S")
+
try:
from pyasn1.codec.der import decoder, encoder