From a3d244aac1045e19f1e0c69fce9fbfdc0ccbf21f Mon Sep 17 00:00:00 2001 From: stevenknight Date: Tue, 6 Apr 2010 00:11:35 +0000 Subject: [PATCH] Issue 2331: use cPickle in preference to the pickle module. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4768 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/engine/SCons/Tool/msvs.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py index c5e93ac6..684ca458 100644 --- a/src/engine/SCons/Tool/msvs.py +++ b/src/engine/SCons/Tool/msvs.py @@ -35,10 +35,10 @@ from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import base64 +import cPickle import hashlib import ntpath import os -import pickle import re import sys @@ -426,10 +426,10 @@ class _GenerateV6DSP(_DSPGenerator): if self.nokeep == 0: # now we pickle some data and add it to the file -- MSDEV will ignore it. - pdata = pickle.dumps(self.configs,1) + pdata = cPickle.dumps(self.configs,1) pdata = base64.encodestring(pdata) self.file.write(pdata + '\n') - pdata = pickle.dumps(self.sources,1) + pdata = cPickle.dumps(self.sources,1) pdata = base64.encodestring(pdata) self.file.write(pdata + '\n') @@ -487,7 +487,7 @@ class _GenerateV6DSP(_DSPGenerator): # OK, we've found our little pickled cache of data. try: datas = base64.decodestring(datas) - data = pickle.loads(datas) + data = cPickle.loads(datas) except KeyboardInterrupt: raise except: @@ -506,7 +506,7 @@ class _GenerateV6DSP(_DSPGenerator): # it has a "# " in front of it, so we strip that. try: datas = base64.decodestring(datas) - data = pickle.loads(datas) + data = cPickle.loads(datas) except KeyboardInterrupt: raise except: @@ -688,10 +688,10 @@ class _GenerateV7DSP(_DSPGenerator): if self.nokeep == 0: # now we pickle some data and add it to the file -- MSDEV will ignore it. - pdata = pickle.dumps(self.configs,1) + pdata = cPickle.dumps(self.configs,1) pdata = base64.encodestring(pdata) self.file.write('\n') @@ -792,7 +792,7 @@ class _GenerateV7DSP(_DSPGenerator): # OK, we've found our little pickled cache of data. try: datas = base64.decodestring(datas) - data = pickle.loads(datas) + data = cPickle.loads(datas) except KeyboardInterrupt: raise except: @@ -810,7 +810,7 @@ class _GenerateV7DSP(_DSPGenerator): # OK, we've found our little pickled cache of data. try: datas = base64.decodestring(datas) - data = pickle.loads(datas) + data = cPickle.loads(datas) except KeyboardInterrupt: raise except: @@ -937,7 +937,7 @@ class _GenerateV7DSW(_DSWGenerator): # OK, we've found our little pickled cache of data. try: datas = base64.decodestring(datas) - data = pickle.loads(datas) + data = cPickle.loads(datas) except KeyboardInterrupt: raise except: @@ -1042,7 +1042,7 @@ class _GenerateV7DSW(_DSWGenerator): '\tEndGlobalSection\n') self.file.write('EndGlobal\n') if self.nokeep == 0: - pdata = pickle.dumps(self.configs,1) + pdata = cPickle.dumps(self.configs,1) pdata = base64.encodestring(pdata) self.file.write(pdata + '\n') -- 2.26.2