From 4e415fe4ab2ad018a3ddf51551445fafc8de260a Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Sat, 22 Aug 2015 19:55:46 -0700 Subject: [PATCH] use pickle protocol 2 for python2/3 compatibility --- wakatime/session_cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wakatime/session_cache.py b/wakatime/session_cache.py index 7986fa0..3cff2a5 100644 --- a/wakatime/session_cache.py +++ b/wakatime/session_cache.py @@ -52,7 +52,7 @@ class SessionCache(object): conn, c = self.connect() c.execute('DELETE FROM session') values = { - 'value': pickle.dumps(session), + 'value': pickle.dumps(session, protocol=2), } c.execute('INSERT INTO session VALUES (:value)', values) conn.commit()